Testing for Open Form

J

John Spencer

Access 2000 and greater try


If CurrentProject.AllForms("MyForm").IsLoaded Then

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
R

Rich K

Bill,
This is a function that I've been using for a while, it seems to serve me
well:

------------------------------------

Function IsLoaded(MyFormName)

Dim i

IsLoaded = False
For i = 0 To Forms.COUNT - 1
If Forms(i).FormName = MyFormName Then
IsLoaded = True
Exit Function ' Quit function once form has been found.
End If
Next

End Function
 
R

Rich K

Thanks! This is much better!


John Spencer said:
Access 2000 and greater try


If CurrentProject.AllForms("MyForm").IsLoaded Then

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Top