Run Macro only if certain form is open

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?
 
S

StrayBullet via AccessMonster.com

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.
 
C

Chuck

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.
 
S

Steve Schapel

Chuck,

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

Chuck

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?
 
Top