find out if all forms are closed

J

JEM

Hello. I'm working with an Access 2003 adp/SQL Server 2000. I'm
trying to write some VBA code that would get checked when any form is
closed to see if all other forms are also closed so that, if so, the
main menu form could come up. Is there a simple way to do this?
Thanks,
Jenn
 
P

PBsoft

Hello. I'm working with an Access 2003 adp/SQL Server 2000. I'm
trying to write some VBA code that would get checked when any form is
closed to see if all other forms are also closed so that, if so, the
main menu form could come up. Is there a simple way to do this?

If Application.Forms.Count = 0 Then....
 
J

JEM

If Application.Forms.Count = 0 Then....

Thanks, i knew there had to be a simple solution! FYI: I changed it
so that If Application.Forms.Count = 1 then it opens the frmMainMenu
and put that in the OnClose event of the form.
 
Top