Hide Label in Main Report if Subreport has no Data.

A

Access Idiot

Hi, I know this must be easy, however I am stumped on this after working at
it for an hour.
I have a main report. With 3 subreports. There are labels on the main
report showing what each subreport represents.
If there is no data to show in the subreport it does not show up on the main
report, which is prefect. However the label remains, and I want it not to.
I tried using the "onnodata" to build an event procedure. However it sets
the label to visible = false when there is not data, but when I change the
paramaters, there is no way to turn the Label to visible = false.
Can someone help me with this ?
 
A

Allen Browne

Change the label into a text box, and set its Control Source to something
like this:
=IIf([Sub1].[Report].[HasData], "Show this", Null)

Replace "Sub1" with the name of your subreport control, and "Show this" with
the text you wish to see if the report has data.
 
Top