I have a form that needs a machine number added before I want the user to go to the next record. The control name is MachNo I have the following code for the On Exit event. When I run it, the message works, but when the form comes back, the cursor moves to the next control. I would like the cursor to remain in the MachNo field.
If [MachNo] > 0 Then
Close
Else
MsgBox "Fill in the Machine #!"
DoCmd.GoToControl "MachNo"
End If
Any suggestions, thanks.
Thanks for the help.
Greg
If [MachNo] > 0 Then
Close
Else
MsgBox "Fill in the Machine #!"
DoCmd.GoToControl "MachNo"
End If
Any suggestions, thanks.
Thanks for the help.
Greg