Can a form being open be a condition?

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

Guest

Is there some expression I can use in a macro that indicates that a
particular form is open? I am trying to get a command button on a form to do
different things depending on what form is open in the application at the
moment.
 
I don't usually run macros, but I think this will work.
You'll definitely want to test it though! I believe this
will only work if you are running Access 2000 or higher.
I don't think this function is available prior to 2000.
For your condition, use:

[CurrentProject].[AllForms]("FormName").[IsLoaded]=False

=False would mean the form is not open, while =True would
mean the form is open.

Hope that helps!
 
Back
Top