close a form upon opening another.

  • Thread starter Thread starter postman
  • Start date Start date
P

postman

How to automatically close a form upon opening another.

I have two forms, the first prepares data for the second form, and have the same table. The second form is opened from a control button on the first.
I would like the first form to be closed when that button is hit, if possible.

Thanks in advance.
 
In the button's Click event, after you've issued the DoCmd.OpenForm, put
DoCmd.Close acForm, Me.Name:


DoCmd.OpenForm "MyOtherForm"
DoCmd.Close acForm, Me.Name



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



How to automatically close a form upon opening another.

I have two forms, the first prepares data for the second form, and have the
same table. The second form is opened from a control button on the first.
I would like the first form to be closed when that button is hit, if
possible.

Thanks in advance.
 

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

Back
Top