record focus - closing forms

scottappleford

Registered User.
Local time
Today, 11:50
Joined
Dec 10, 2002
Messages
134
Hi

I would like a form to get focus on a record when the form is in view.

I would also like to close a form when it is not in view. This needs to be done automatically i.e if another form is opened by pressing a button etc.

thanks
 
Not quite sure what you mean. Could you explain a bit more

IMO
 
If you want the same object to have the focus everytime the form is in view:

Private Sub Form_GotFocus()

ObjectName.SetFocus

End Sub


If you want a form to aoutomatically close, you need to put this code behind an event procedure
(like CommandButtonName_Click):

DoCmd.Close

If you want a more specific answer, please provide more information. Let me know what exactly you want to do.
 

Users who are viewing this thread

Back
Top Bottom