display label only if x>1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I make a label box only visable if another text box is greater than
$1.00.
 
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
 
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"
 

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

Back
Top