A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Run Macro only if certain form is open



 
 
Thread Tools Display Modes
  #1  
Old March 6th, 2008, 12:39 AM posted to microsoft.public.access.forms
Chuck
external usenet poster
 
Posts: 372
Default Run Macro only if certain form is open

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?
--
Thanks,
Chuck
  #2  
Old March 6th, 2008, 01:01 AM posted to microsoft.public.access.forms
StrayBullet via AccessMonster.com
external usenet poster
 
Posts: 48
Default Run Macro only if certain form is open

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 wrote:
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?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200803/1

  #3  
Old March 6th, 2008, 01:21 AM posted to microsoft.public.access.forms
Chuck
external usenet poster
 
Posts: 372
Default Run Macro only if certain form is open

Thank you. That makes sense.
--
Thanks,
Chuck


"StrayBullet via AccessMonster.com" wrote:

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 wrote:
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?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200803/1


  #4  
Old March 6th, 2008, 02:25 AM posted to microsoft.public.access.forms
Steve Schapel
external usenet poster
 
Posts: 1,422
Default Run Macro only if certain form is open

Chuck,

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

--
Steve Schapel, Microsoft Access MVP

Chuck wrote:
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?

  #5  
Old March 6th, 2008, 04:37 PM posted to microsoft.public.access.forms
Chuck
external usenet poster
 
Posts: 372
Default Run Macro only if certain form is open

That is exactly what I needed.
--
Thanks,
Chuck


"Steve Schapel" wrote:

Chuck,

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

--
Steve Schapel, Microsoft Access MVP

Chuck wrote:
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?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.