SetFocus Problem

  • Thread starter Thread starter Anthony Viscomi
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top