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.
 

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