Testing for Open Form

  • Thread starter Thread starter Bill H.
  • Start date Start date
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
..
 
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
 
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
..
 
Back
Top