How can I tell if a particular form is open in a Subroutine

  • Thread starter Thread starter Spidey3721
  • Start date Start date
S

Spidey3721

I am writing a subroutine for a command button that will refresh a separate
(not the form that the button resides on).

If that form is not open, however, I am getting an error message.

I now want to put an If Statement into the button's Sub that will check to
see if that form is open...
 
In Access 2000 or later ...

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

For earlier versions of Access, see the IsLoaded function that is in most of
Microsoft's sample MDBs. I'm going from memory here, but for Access 97 I
think you should find it in either Northwind or Orders, in a module called
something like 'Utility Functions'.
 
Back
Top