How can I check if a form is open

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi Guys,
Can you help? I'm running some VBA code and want to check
if a certain form is open before the next line of code is
processed so that I can ensure the correct ID is being
used. Is there a function I can use similar to "if
cnnCurrentConnection.State = adStateOpen then" to check
that the form is open before I use it or failing that,
anyway to check if it is open at all?

If anyone can help I would really appreciate it,

Many Thanks
Paul
 
In the latest versions of Access, you can use:
If CurrentProject.AllForms("Form1").IsLoaded Then

In earlier versions, copy the IsLoaded() function from the Northwind sample
database.
 
Back
Top