How to verify if a Form is open

R

Rodolfo Fontes

Hi group,

Can I verify is a Form is open?
I yes, how?

Thanks,
Rodolfo Fontes
 
A

Arvin Meyer

The Northwind sample database that comes with Access has an IsLoaded
function which you can use. Here is something similar:

Public Function IsLoaded(strName As String) As Boolean
IsLoaded = (SysCmd(acSysCmdGetObjectState, acForm, strName) <> 0)
End Function
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
V

Van T. Dinh

Also, if you use A2K or later, you can use:

CurrentProject.AllForms("YourForm").IsLoaded

which returns True if the Form is open or False otherwise.
 
R

Rodolfo Fontes

Thanks!
It worked just fine!

Van T. Dinh said:
Also, if you use A2K or later, you can use:

CurrentProject.AllForms("YourForm").IsLoaded

which returns True if the Form is open or False otherwise.
 
Top