Numeric Value If Statement Help Needed!

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

I need for the Label 383 to be visible if Text362 which is a numeric value,
i.e. Number is Null
And if LblPrtQuot.Visible = False

Tried below code but to no avail.

lngValue = Abs(Text362)
Label383.Visible = (lngValue < 1)

If LblPrtQuot.Visible = True Then
Label383.Visible = False
End If


Thanks,
Dave
 
Ok, label visible is Text362 is null and LblPrtQuot is visible, correct?

If so, in the form's Current event and in the AfterUpdate event of the
textbox try:

Me.Label383.Visible = IsNull(Me.Text362) And Me.LblPrtQuot.Visible

This could also be done with If statements, but since the results of both
parts of the right side of the equal return True or False, you can just use
that directly.
 
If LblPrtQuot is visible then Label362 should not be visible.
If Text362 IsNull then Label362 should not be visible.
Dont know if it makes a difference, but Text362 is a numeric field.
Tried your code, but the Label362 showed up only when LblPrtQuot was
visible.
 
THANKS, this made it work...

Me.Lbl383.Visible = IsNull(Me.Text362)
If LblPrtQuot.Visible = True Then
Lbl383.Visible = False
End If
 
Glad you got it going. If I got one of them backward, all you need to do is
a the Not keyword in front of it.

Example:
Me.Label383.Visible = IsNull(Me.Text362) And Not Me.LblPrtQuot.Visible
 
Back
Top