Hide Text Box On A Report

all7holly

Registered User.
Local time
Today, 08:34
Joined
Nov 16, 2011
Messages
49
Hello,

How do I hide a single text box on a report if there is no data? The label is called “LableBillingWeeks” and the control source is called “BillingWeeks”. Any thoughts?
 
Set the Can Shrink property to Yes. It'll disappear if the text box has a null value.
 
Note that if the label is aligned horizontally with the control (i.e. is to the left of the control), it will not shrink.
 
How is the layout configured? Can you give a screenshot of it?
 
I have already set it to shrink. I need to have the label (BillingWeeksLable) show when there is data.
 

Attachments

  • New Picture (11).jpg
    New Picture (11).jpg
    101.5 KB · Views: 118
The label will not shrink at all. It will always be visible. Labels don't have a Shrink property.
 
The label itself doesn't have a Shrink property, but you could set the visible property in VBA to whether or not the text box has a null value. In the report's On Current event, add:
Code:
Me.LableBillingWeeks.Visible = IsNull(Me.BillingWeeks)

That should take care of the label.
 

Users who are viewing this thread

Back
Top Bottom