display label only if x>1

  • Thread starter Professional_in_need_of help
  • Start date
P

Professional_in_need_of help

How do I make a label box only visable if another text box is greater than
$1.00.
 
W

Wayne-I-M

Hi

Set this on the AfterUpdate of the text box

Private Sub TextBoxABC_AfterUpdate()
If Me.TextBoxABC > 1 Then
Me.Label123.Visible = True
Else
Me.Label123.Visible = False
End If
End Sub

Set this OnLoad of the form
Me.Label123.Visible = False

Set the format of the text box to currency


Change the names
Label123 and TextBoxABC to what you have used on your form

HTH
 
B

BruceM

In the form's Current event:
If Me.YourTextBox > 1 Then
Me.YourLabel Visible = False
Else
Me.YourLabel.Visible = True
End If

This assumes the format for the YourTextBox field is Currency. Use the
actual text box and label names.

If you need the label to be hidden or displayed immediately upon entering
the value into the text box you will need the same code in the text box's
After Update event.

"Professional_in_need_of help"
 
Top