Hide labels

mark curtis

Registered User.
Local time
Today, 23:27
Joined
Oct 9, 2000
Messages
457
I have a report which uses many subforms and on the sub forms I have labels such as "description". My problem is that when the report runs and the subforms load some of the records return no data which I expect but the labels are still visible. Is there anyway that I can hide the labels if the control has no data and if so where such I place any code.

Thanks
 
In the OnOpen event of the specific subform put this code:

If Isnull(Me![MyTestField] then
Me![MyTestFieldsLabel].visible = false
End if

Do the above for each field you wish to test for values.

Should work!

Ian
 
I have a similar problem, but when I make the label invisible it still occupies space in the report.

I can't find how to set a 'can shrink' property or anything like that to effectively delete the label when there is no associated data.
 

Users who are viewing this thread

Back
Top Bottom