Open & Close forms

  • 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.
 
Put this code in the button's Click event:

DoCmd.OpenForm "Form2"
DoCmd.Close acForm, "Form1"
 
I tried to you this same code to open the same form. But
apparently that doesn't work. I'm trying to reopen the
same form which is developed from a criteria query and
want the user to be able to click a button which closes
the current record and then runs the critera query and
open the "criteria" record in the same form.

I hope you can help.

Thanks. Sondra
 
Back
Top