Calling Access Macros

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Dexter1
Pro Scripter
Posts: 64
Joined: Mon Jun 19, 2006 3:28 pm

Calling Access Macros

Post by Dexter1 » Fri Aug 04, 2006 10:08 pm

Currently we use Macro Scheduler to call a .bat file which in turn calls an MS Access macro. Is there a way to call the Access macro from Macro Scheduler and cut out the middle man (the .bat file)?
Thanks,
Josh

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Aug 05, 2006 1:05 am

You can start Access and tell it to call a macro like this:
Access.exe path\database /x macroname

Example:

Code: Select all

Run Program>C:\Program Files\Microsoft Office\Office11\MSAccess.exe C:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb /x macroname
Alll of the info in the example is actually on one line, but may be broken where there is a space character.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Dexter1
Pro Scripter
Posts: 64
Joined: Mon Jun 19, 2006 3:28 pm

Post by Dexter1 » Sat Aug 05, 2006 7:40 am

Perfect, thanks!
Thanks,
Josh

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Aug 05, 2006 1:41 pm

I forgot to mention that you could also have an AutoExec macro in Access vs. calling a macro on the command line.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts