Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When does the On Lost Focus command fire for a Form? 1

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
Hello, In Access 2002 I have a form that when a button is clicked a new form appears, or when the close button is pressed and the form closes. Neither execute the "Private Sub Form_LostFocus()" sub.

I have a break in the sub and the code MsgBox "hello" neither seem to happen.

Thus my question, when doe the On Lost Focus command fire?

Thanks
djj
 
Pretty rare event because:

A form can receive the focus only if it has no controls or if all visible controls are disabled. If a form contains any visible, enabled controls, the GotFocus event for the form doesn't occur.
 
I'd use the Deactivate event.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the replies.
MajP - That explains a lot.
PHV - Thank you also, I just have to find which does what when.

Thanks again,
djj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top