Code:
errHandler:
If Err.Number = 3021 Then
MsgBox "Invalid Employee Number!" & vbCrLf & _
"Please check the number again.", vbOKOnly + vbInformation, "Message"
DoCmd.GoToControl "txtEmpNo"
Else
MsgBox "A problem occurred when trying to retrieve the employee record.", _
vbOKOnly + vbCritical, "Error"
End If
Focus does not go to txtEmpNo
How do you do it?
Thanks!