G Guest Apr 23, 2005 #1 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.
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.
D Duane Hookom Apr 23, 2005 #2 Set the format property to a value that will not display any value. Search Help on "Format Number".
G Guest Apr 23, 2005 #3 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.
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.
D Duane Hookom Apr 24, 2005 #4 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")
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")