How tell if a form is open ?

G

Guest

I need code to check if a form is open (not loaded but open). I have the isloaded() function but it returns True so that wont work.
 
D

Douglas J. Steele

What's your definition of the difference? Is a loaded form not visible? If
so, once you know that the form is loaded, check its Visible property.

If IsLoaded(strFormName) Then
If Forms(strFormName).Visible Then
' It's open
Else
' It's not
End If
Else
' It's not loaded
End If

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


David said:
I need code to check if a form is open (not loaded but open). I have the
isloaded() function but it returns True so that wont work.
 
G

Guest

In the on open event the form is loaded but not yet visible, thats what I need to check
 

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