Open & Close forms

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.
 
P

PC Datasheet

Put this code in the button's Click event:

DoCmd.OpenForm "Form2"
DoCmd.Close acForm, "Form1"
 
S

Sondra

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
 

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

Top