Launch Macro in different Access db

G

Guest

I have 3 different databases which have macros which need to run daily.

They are cascading. I would like to open the next db and launch the daily
macro from within the first macro. I'm thinking RunApp, but I can't figure
out how to send the command to run the macro. I tried SendKeys %TMMDaily
FTS Update~ , but it wants to find the macro name from within the original
database, not the one I opened with RunApp

DB1: Fleets.mdb daily macro: "Import RFMS Data"
DB2: FleetTracking System.mdb daily macro: "Daily FTS Update"
DB3: Next Gen Plastics.mdb daily macro: "Daily Update from FTS"

BTW - They aren't macros that I want to set up to run on open.
 
S

Steve Schapel

Robin,

RunApp will work. Command Line something like this...

"C:\Program Files\Microsoft Office\Msaccess.exe"
"C:\YourFolder\FleetTracking System.mdb" /x "Daily FTS Update"
 
G

Guest

Steve,

What does the /x signify?

-The Novice

Steve Schapel said:
Robin,

RunApp will work. Command Line something like this...

"C:\Program Files\Microsoft Office\Msaccess.exe"
"C:\YourFolder\FleetTracking System.mdb" /x "Daily FTS Update"
 
S

Steve Schapel

TwinDad,

The /x is simply a command line switch that indicates "run the macro,
the name of which follows".
 
G

Guest

Steve,

I have the runapp to work with mine, but i would like not to have it open
and just run in the background. Is that possible?

Charlie
 
S

Steve Schapel

Charlie,

No, you can't run a macro without opening the database. Best you can
do, I suppose, is put a Quit action as the final action in the macro, so
the database closes again after it has done its thing.
 
A

Andy

Steve, I cannot seem to get this to work no matter how I try. I've also tried
by running code via a module. Any pointers please?

I am trying to launch macros in mdb A from mdb B. In mdb B I have a macro
with a RunApp command

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"S:\....\Extracts Database A.mdb" / x "1 - Delete PTL Appts Table"

And I get the message the Access doesn't recognize the command line option.
The first part runs fine on it's own so my path to launch the programme is
fine.

Thanks
 
S

Steve Schapel

Well, that's the trouble with computers - always so pernickety about trivial
little details!
 

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

Top