Hiding Labels

A

Alex

I have several labels in my report, check1, check2, check3, etc... I need to
hide these labels if the [Type] field does not equal "Module". How can I
write code that will hide them if [Type] <> "Module"? I already have a macro
in the OnOpen event of the report so I'm not sure where I'd put the code.
The macro is used to open a form that a user input query parameters for the
report. Thanks for your help.
 
D

Duane Hookom

Use code in the On Format event of the section containing the controls (must
be in a module). Your code would look something like:

Me.check1.Visible = (Me.[Type] ="Module")
Me.check2.Visible = (Me.[Type] ="Module")
Me.check3.Visible = (Me.[Type] ="Module")
etc
 
Top