Close form 1 when open form 2

Mmattson

Registered User.
Local time
Today, 17:40
Joined
Oct 28, 2002
Messages
46
I used the command button wizard to create a button to move to the next page (form). I would like this action to also close the form I am leaving.

How to do this?
 
Open the OnClick event for your button. Following the code that opens your first form...type in the following command replacing the YourFormName with the name of the form that you want to close.

DoCmd.Close acForm, "YourFormName"

Try that

HTH
 
...worked beautifully. Thank you.
 

Users who are viewing this thread

Back
Top Bottom