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"
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
resource@pcdatasheet.com
www.pcdatasheet.com
> How to automatically close a form upon opening another.
>
[quoted text clipped - 4 lines]
>
> Thanks in advance.
Sondra - 15 Mar 2005 20:14 GMT
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
>-----Original Message-----
>Put this code in the button's Click event:
[quoted text clipped - 19 lines]
>
>.