Run Macro only if certain form is open

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

I have programed a maco to open one of various forms depending on criteria on
an open form. Is there a way to run a "follow up Macro" based on which form
opens? In other words can I run a macro based on wheather a certain form is
active?
 
Take a look at the RunMacro Method of the DoCmd object. You can have it as
part of the OnLoad of the form in question.
 
Thank you. That makes sense.
--
Thanks,
Chuck


StrayBullet via AccessMonster.com said:
Take a look at the RunMacro Method of the DoCmd object. You can have it as
part of the OnLoad of the form in question.
 
Chuck,

You can use a Condition in your macro, like this:
[Screen].[ActiveForm].[Name]="whatever form"
 
That is exactly what I needed.
--
Thanks,
Chuck


Steve Schapel said:
Chuck,

You can use a Condition in your macro, like this:
[Screen].[ActiveForm].[Name]="whatever form"

--
Steve Schapel, Microsoft Access MVP
I have programed a maco to open one of various forms depending on criteria on
an open form. Is there a way to run a "follow up Macro" based on which form
opens? In other words can I run a macro based on wheather a certain form is
active?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top