Not printing certain controls in a report

AnnPhil

Registered User.
Local time
Today, 13:27
Joined
Dec 18, 2001
Messages
246
I have a report that I need certain controls (labels)not to print if there is no data a particular text box control. In the details section of the report I added code in the On Format event that basicly said Visible = False if text box control is = to null. This worked but then it would leave blank spaces. So then i add the Can Shrink property to the report properties and it still printed the report with unwanted space if there is no data in the controls.

I have had other situations where the can shrink feature doesn't seem to work.


Any suggestions?
 
I've had success combining the label and the data into one text box.

The Control Source looks something like this:
=IIf(IsNull([MyField]),"","Something Nice: " & [MyField])

Make sure that you set Can Shrink for this text box to Yes.
 

Users who are viewing this thread

Back
Top Bottom