Is form Open?

L

Lyle

I need to have one form check to see if another form is open. Anyone know
how to do this??
Thanks,
Lyle
 
S

StCyrM

Hi Lyle

You can use the following function to check if the a form is loaded.

Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.


Function FormIsLoaded(MyFormName As String) As Boolean
'
' Determines if a form is loaded.
'
Dim i As Integer
FormIsLoaded = False
For i = 0 To Forms.Count - 1
If Forms(i).FormName = MyFormName Then
FormIsLoaded = True
Exit Function ' Quit function once form has been found.
End If
Next i
End Function
 
Top