如何在批处理文件中打开Access数据库(并在继续之前等待它关闭)?

时间:2021-02-25 23:56:24

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

我试过这些,但它们没有用(Access打开,但它不等待:

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

2 个解决方案

#1


2  

start /WAIT msaccess.exe filename.mdb

does the trick.

诀窍。

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

我不知道为什么添加完整路径会导致失败。

#2


1  

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

#1


2  

start /WAIT msaccess.exe filename.mdb

does the trick.

诀窍。

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

我不知道为什么添加完整路径会导致失败。

#2


1  

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