How tell if a form is open ?

D

David

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.
 
D

david

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