Avatar of CavMom
CavMom
 asked on

Microsoft Access 2003 Report Design - Eliminating White Space

We have a report where the design is as follows:

DocNo                 IdInfo
                            Summary

The IdInfo control is based upon an IIf statement to combine four fields of the table.  Summary is a Total Access Memo ActiveX add-in to allow for formatting of the text in the memo field.  In certain instances, IdInfo will contain no data and, therefore, leaves a blank space in the report.  What can we do to get rid of that blank space when there is no data to fill the IdInfo control?

Thanks!
Microsoft Access

Avatar of undefined
Last Comment
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

8/22/2022 - Mon
Rey Obrero (Capricorn1)

set the  can grow and can shrink property of the control to YES

see this link

How to eliminate white space in reports with CanShrink and code in Access
http://support.microsoft.com/?kbid=299011
CavMom

ASKER
Thanks for the speedy response.  That doesn't work since the DocNo control is to the left of IdInfo.  The can grow and can shrink only work if the entire vertical area is empty.  The DocNo control needs to remain where it is and Summary needs to move up if IdInfo is empty.
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

Is the IdInfo control the TA Control you refer to?  If so:

Basically, in the OnFormat of the section the TA control is in, check the Summary Total first ... if zero, the make the TA control No visible and set it's Height to 0,  otherwise make it visible and set the height to the desired size ... or even just deal with the Height ...and leave Visible set to Yes.

mx
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
CavMom

ASKER
No, the IdInfo control is a text box containing an IIf statement combining four fields of the table.  The TA control (Summary) is beneath it.

DocNo (numeric control)                IdInfo (text box with IIf statement combining four fields of table)
                                                       Summary (TA control)

The IdInfo control is the one which may or may not have data.  If it does not, a blank line appears next to the DocNo.  
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

Ok ... then try the same thing I mentioned above on the IdInfo text box ... can you do that?

mx
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

Actually, try wrapping the Idinfo control in a subreport control ...  and set the Can Grow/shrink ...

mx
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
harfang

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Redlord

why not...

in detail_format

if isnull(IdInfo) or trim(idinfo) = "" then
  idinfo.visible = false
  summary.top = idinfo.top
else
  idinfo.visible = true
  summary.top = idinfo.top + idinfo.height + 100 '100 can be anything, its just the default spacing
end if

that way everything lines up all nice

you may also need to add
detail.height = tallestcontrol.height+tallestcontrol.top
to squeeze detail backtogether
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

"mx: I tried your suggestion, "

Mine actually seemed to almost exactly line up.  Maybe a default printer difference?

mx
harfang

mx: yeah, who knows? access reporting sure isn't an exact science!  (^v°)
Your help has saved me hundreds of hours of internet surfing.
fblack61
CavMom

ASKER
I appreciate all of your responses.  Haven't had a chance to get back to the project this morning but I will before the day is out.
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

CavMom:
Thank you for coming back and closing out. Very cool.

mx
CavMom

ASKER
I apologize for not doing it sooner.  Today has been the first day that I've been back on this project.  Thanks for the help!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

No problem.  We just appreciate you coming back. Many do not!

thanks again.

mx