Numeric Value If Statement Help Needed!

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
 
W

Wayne Morgan

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.
 
D

Dave Elliott

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.
 
D

Dave Elliott

THANKS, this made it work...

Me.Lbl383.Visible = IsNull(Me.Text362)
If LblPrtQuot.Visible = True Then
Lbl383.Visible = False
End If
 
W

Wayne Morgan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top