IsActive or IsOpen

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am trying to set an OnClose action on one form, say form "A", where it
will attempt to requery another form, form "B" only if it is open. I have
tinkered with IF IsActive and IsOpen functions but still get the "Can't find
the form...." message. I am using MS Access 2003 with and my experience in
VBA is still maturing. Any help is greatly appreciated.

Adam Kemp
 
Use something like this:

If CurrentProject.AllForms("Form1").IsLoaded Then
Forms("Form1").Requery
End If
 
Hello,

I am trying to set an OnClose action on one form, say form "A", where it
will attempt to requery another form, form "B" only if it is open. I have
tinkered with IF IsActive and IsOpen functions but still get the "Can't find
the form...." message. I am using MS Access 2003 with and my experience in
VBA is still maturing. Any help is greatly appreciated.

Adam Kemp


Access 2000 or newer.....

If CurrentProject.AllForms("FormB").IsLoaded Then
' the form is open
' Do something here
Else
' The form is not open
' Do something else
End If
 
Back
Top