SetFocus Problem

A

Anthony Viscomi

For some reason, and I'm sure its a simple one, the follow code won't set
the focus where it belongs. I've you used the same exact sub for another
event within another form and it worked fine. Please help, I've already
spent too much time on this silly issue.

Private Sub Option_LostFocus()
If IsNull (Me.Option) Then
MsgBox "An Option must be selected"
Me.Option.SetFocus
End IF
End Sub
 
V

Van T. Dinh

You cannot use the LostFocus Event of a Control to set the Focus to itself
(or infact, anyother Control except the already-decided Control) since the
next Control to get the Focus has been decided when the LostFocus Event of
the "previous" Control occurs.
 
Top