UPachqge
New member
- Local time
- Today, 13:19
- Joined
- Jun 22, 2011
- Messages
- 9
Hello,
I have a label which I want to set as visible when a textbox is greater than a certain value. When that textbox is less than the certain value, I want the label to not be visible.
I'm able to get it working with a command button using an If statement. With the same If statement, in the On Current event of the form, it will change to visible but when selecting a new record (via combo box) the label will stay, even if the textbox is below a certain value.
How can I get the label to change when selecting a new record like I can with a button? I have a feeling I'm missing something simple with where to put the If statement in some form event.
Working If statement on button:
Private Sub Command99_Click()
If Me.Text_Minutes < 1900 Then
Me.AgentMax.Visible = False
Else
Me.AgentMax.Visible = True
End If
End Sub
I have a label which I want to set as visible when a textbox is greater than a certain value. When that textbox is less than the certain value, I want the label to not be visible.
I'm able to get it working with a command button using an If statement. With the same If statement, in the On Current event of the form, it will change to visible but when selecting a new record (via combo box) the label will stay, even if the textbox is below a certain value.
How can I get the label to change when selecting a new record like I can with a button? I have a feeling I'm missing something simple with where to put the If statement in some form event.
Working If statement on button:
Private Sub Command99_Click()
If Me.Text_Minutes < 1900 Then
Me.AgentMax.Visible = False
Else
Me.AgentMax.Visible = True
End If
End Sub