I am using the Exit event of a textbox to check for invalid data as follows:
Private Sub Order_Number_Exit(Cancel As Integer)
If [Order Number].Text = "" Then
MsgBox "ERROR - You Must Enter An Order Number!"
Me.[Order Number].SetFocus
End If
End Sub
The problem is that the MsgBox appears OK but focus is given to the next textbox in the tabindex.
I've tried this with all events and the results are the same!
Any ideas as to what's going on?
Thanks
Private Sub Order_Number_Exit(Cancel As Integer)
If [Order Number].Text = "" Then
MsgBox "ERROR - You Must Enter An Order Number!"
Me.[Order Number].SetFocus
End If
End Sub
The problem is that the MsgBox appears OK but focus is given to the next textbox in the tabindex.
I've tried this with all events and the results are the same!
Any ideas as to what's going on?
Thanks