AutoExec then Quit gives errors in command line

G

Guest

here's what i have set up:
..bat file - copies a database to a second file
..bat file - opens the copy "db2"
db2 - autoexec macro
macro - runs query
macro - exports data to csv file
macro - exits access program

this all works well if I run the access file from windows, but when I open
the mdb file from a command line, it will run the macro and everything fine,
BUT it gives an error "cannot find file"

i don't understand this because everything works fine, so i shouldn't get
any errors.

here's my files:
inventory.bat:
copy "C:\Program Files\Veeder-Root\Inform\Data\Inform.mdb" "C:\Program
Files\Veeder-Root\Inform\Data\Inform2.mdb"
"C:\Program Files\Veeder-Root\Inform\Data\Inform2.mdb"
exit

AutoExec macro:
run query
quit


any help would be much appriciated. I need this bat file to run every day
behind the scenes, but i don't want this error popping up every day.

Thanks
 
G

Guest

Hi Bryan

In your batch file try running the msaccess executable with your database as
a parameter.

Something like...

"C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\Program
Files\Veeder-Root\Inform\Data\Inform2.mdb"


Regards

Andy Hull
 

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