I have the code:
Private Sub Form_Current()
If (Me!Priority1Limit) <= Me!Priority1Calls Then
Me!Priority1Calls.ForeColor = 255
Me!Label.Visible = True
Else
Me!Priority1Calls.ForeColor = 0
Me!Label.Visible = False
End If
End Sub
In the current event of a form. What I would like to know is how I could get this to run automatically without say attaching the code:
Form_Current
to the afterupdate event of the Priority1Limit textbox. What I want is for the code to run automatically each time the form is opened so that it will check whether the value in Priority1Calls is greater than that in Priority1Limit and if so it will change the colour of the Priority1Calls textbox and show a label
Thanks
Private Sub Form_Current()
If (Me!Priority1Limit) <= Me!Priority1Calls Then
Me!Priority1Calls.ForeColor = 255
Me!Label.Visible = True
Else
Me!Priority1Calls.ForeColor = 0
Me!Label.Visible = False
End If
End Sub
In the current event of a form. What I would like to know is how I could get this to run automatically without say attaching the code:
Form_Current
to the afterupdate event of the Priority1Limit textbox. What I want is for the code to run automatically each time the form is opened so that it will check whether the value in Priority1Calls is greater than that in Priority1Limit and if so it will change the colour of the Priority1Calls textbox and show a label
Thanks