Problem to set up control visible property in a report

Ultima67

New member
Local time
Today, 12:20
Joined
Jan 30, 2013
Messages
4
Hello,

I have got a report and in the detail section I have got 4 controls (all text boxes) that I would like to manage the visible property as follow:

If PartNo is not null or has data then PartNo visible, DrawingNo not visible, lblDash not visible, ItemNo not visible

If DrawingNo is not null or has data then DrawingNo visible, lblDash visible, ItemNo visible, but If ItemNo is null, lblDash not visible

I have tried to put VBA code on the On Format Event or on the On Print Event of the detail section but cannot make it work.

Thank you in advance for your help.
Regards,
Sylvie
 
You will definately need VBA code and you will need the code in the On Format of the Details section.

Something like":

Code:
if Not IsNull(me.NameOfControl) then
     'make some control visible 
     me.NameOfControl.Visible = True
end if

Just change the "NameOfControl" to the actual name of the control you want to make visible.
 
It is working perfectly.
Thank you so much.
Regards,
Sylvie
 

Users who are viewing this thread

Back
Top Bottom