Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

Run Macro only if certain form is open

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chuck - 06 Mar 2008 00:39 GMT
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?
Signature

Thanks,
Chuck

StrayBullet - 06 Mar 2008 01:01 GMT
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.

>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?
Chuck - 06 Mar 2008 01:21 GMT
Thank you.  That makes sense.
Signature

Thanks,
Chuck

> 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.
[quoted text clipped - 3 lines]
> >opens? In other words can I run a macro based on wheather a certain form is
> >active?
Steve Schapel - 06 Mar 2008 02:25 GMT
Chuck,

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

Signature

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?
Chuck - 06 Mar 2008 16:37 GMT
That is exactly what I needed.
Signature

Thanks,
Chuck

> Chuck,
>
[quoted text clipped - 5 lines]
> > opens? In other words can I run a macro based on wheather a certain form is
> > active?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.