run macro using a dos bat file

  • Thread starter Thread starter KP
  • Start date Start date
K

KP

Hi everyone,
Is there a way to implement a ms-dos batch file that can automatically
run a macro in an access 97 database. If so, can someone please provide me
some code example?

Also, will the access run in the background? We just want the user to click
the bat file and let the bat file kick off the macro.

any help is greatly appreciated!!!
 
"<Full path to msaccess>\msaccess.exe" "<Full path to database>\MyDB.mdb" /x
MacroToRun

Access will run in the background. You can control whether it's minimized to
the toolbar or open through the shortcut you create to run the command line
above. Unless your macro includes a command to shut down Access, Access will
remain open once the macro's run.

BTW, there was no need to cross-post to so many groups (this has nothing to
do with ado or setup, for instance), but at least you didn't multi-post.
 
KP said:
Hi everyone,
Is there a way to implement a ms-dos batch file that can
automatically run a macro in an access 97 database. If so, can
someone please provide me some code example?

I've writen a command line tool (shareware) for sending SQL-Statements to
JET databases.
You can SELECT, ALTER, UPDATE etc as well as export to csv, watch table
structure etc etc.
This works even if access is not installed - because JET is installed by
default in Windows 2000 and up.
Contact me if you are interested.

Stefan
 
Back
Top