pc1oad1etter
pc1oad1etter

Reputation: 8617

How do I open an Access database (and wait for it to close before proceeding) in a batch file?

I've tried these, and they did not work (Access opens, but it does not wait:

start "C:\program files\Microsoft Office\Office\MSACCESS.EXE" filename.mdb

start /WAIT "C:\program files\Microsoft Office\Office\MSACCESS.EXE" filename.mdb

start /W "C:\program files\Microsoft Office\Office\MSACCESS.EXE" filename.mdb

start filename.mdb

start msaccess.exe filename.mdb

Upvotes: 1

Views: 2672

Answers (2)

James whatley
James whatley

Reputation: 11

PATH="C:\Program Files\Microsoft Office\OFFICE11\; C:\Windows\Command"
START /WAIT MSACCESS.exe "path to mdb file" /X "name of macro"

Upvotes: 1

pc1oad1etter
pc1oad1etter

Reputation: 8617

start /WAIT msaccess.exe filename.mdb

does the trick.

I don't know why adding the full path makes it fail.

Upvotes: 2

Related Questions