Launch Macro in different Access db

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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"
 
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"
 
TwinDad,

The /x is simply a command line switch that indicates "run the macro,
the name of which follows".
 
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
 
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.
 
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
 
Well, that's the trouble with computers - always so pernickety about trivial
little details!
 
Back
Top