I have used code to check a field after data is entered. I placed the code in the After_Update of the field:
If Not Orig_Employee_Num = 1234 Then
MsgBox "Not a valid Employee Number, Try again"
DoCmd.GoToControl "Orig Employee Num"
Cancel = True
End If
The problem I am having is the cursor is not returning to the Orig Employee Number field after the message of an invalid number appears. What can I do to fix this?
Also, should I place the code somewhere so that it checks again when the form is closed??
If Not Orig_Employee_Num = 1234 Then
MsgBox "Not a valid Employee Number, Try again"
DoCmd.GoToControl "Orig Employee Num"
Cancel = True
End If
The problem I am having is the cursor is not returning to the Orig Employee Number field after the message of an invalid number appears. What can I do to fix this?
Also, should I place the code somewhere so that it checks again when the form is closed??