Avatar of SteveL13
SteveL13
Flag for United States of America asked on

Shrink information on a sub-report when no data is available

I have a sub-report on a report that looks like this: (confidential information hidden)

Sub-Report Example
The sub-report has a box around it as you can see.  But here is what I need to do.  If, for example, the detail has no Tax ID # or no Main Phone or if any of the fields have no information, hide the label and shrink the data fields vertically including the box around the sub-form.  I do have the fields and the detail section of the sub-report set to Can Grow = Yes and Can Shrink = Yes.

Can this be done?  If so, how?
Microsoft Access

Avatar of undefined
Last Comment
mbizup

8/22/2022 - Mon
COACHMAN99

you could try the can grow / can shrink properties of the fields in question, and make it small to start
and use conditional formatting to change the label text color to white where no text exists
Gustav Brock

To shrink the box, you will have to loop through the labels and hide those with no value in the taxtbox, then move all the following lines /label and textbox) one line up.
After the loop, there will be no empty values, and you should be able to shrink the box.
ASKER CERTIFIED SOLUTION
mbizup

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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23