Login   ||   Register   ||   Thursday, March 11, 2010
HOW TO CHECK IF A FORM IS OPEN (LOADED)

' Substitute the real form name in the code where it says FORMNAMEHERE.

'Currentproject.AllForms("FORMNAMEHERE").IsLoaded

'So, you can use this premade function if you want:

Function IsLoaded(strFormName As String) As Boolean

    IsLoaded = CurrentProject.AllForms(strFormName).IsLoaded

End Function

And you can call it from a query, function, sub, etc. just by using

IsLoaded "FormNameHere"

or

If IsLoaded("FormNameHere") Then

....etc.

End If

 

Copyright 2007 by BTAB Development    ||   BTAB Development   ||   Terms Of Use