Avatar of newbie46
newbie46
 asked on

How (in VBA) do I check if an Access 2007 form is open?

How do I check if an Access 2007 form is open, in VBA?

if forms!frmMainMenu!????
Microsoft Access

Avatar of undefined
Last Comment
newbie46

8/22/2022 - Mon
newbie46

ASKER
if forms!frmMainMenu.form.visible = true does not produce the desired result.
mbizup

If currentproject.allforms("formname").isloaded then
Msgbox"form is open "

End if
mbizup

Sorry - the first two lines should be one

CurrentProject.allforms("formname").isloaded
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
newbie46

ASKER
CurrentProject.allforms("formname").isloaded
If I am checking to see if a subform is visible, does the "formname" have to include the parent form along with the subform or just the subform name?
ASKER CERTIFIED SOLUTION
mbizup

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
newbie46

ASKER
Thank you!