Label Visible and if is Zero

D

Dave Elliott

I need Lbl401 to be visible if Text392>Text390
But if Text392 and Text390 are the same, then not visible.
Trying the below code with no luck.
The code works correctly on some records, but not on other records.???
It appears to be a timing problem, I think.
There is a lot of math done on this form.

Me.Lbl401.Visible = (Me.Text392) > (Me.Text390) 'OverBilled
Me!Lbl401.NotVisible = (Val(Nz(Me!Text392, 0)) < 0)
 
A

Allen Browne

How about changing the label into a text box with this Control Source:
=IIf([Text392] > [Text390], "OverBilled", Null)

Access should then sort out the dependencies in its order of calculation,
and show the desired result.
 
Top