Hiding controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the best way to hide a control if the value is null or 0? I tried an
If...End On Load but that didn't work.
 
Set the format property to a value that will not display any value. Search
Help on "Format Number".
 
Thank you for your help. I know how not to dislpay the number, but I am
trying to hide the label. It's for a discount line and I don't want people
asking how they can get a discount.
 
Next time please provide more specifications so this can be answered in less
back and forth.

You can use code in the On Format event like:

Me.lblYourLabel.Visible = (Not Nz(me.txtYourTB, 0) = 0)

You can also substitute a text box for the label and use a control source
like:
=IIf(Nz(me.txtYourTB, 0) = 0,Null, "Your Caption")
 
Back
Top