Forum Discussion
Gianmario43
Nov 14, 2021Copper Contributor
ACCESS creation of a .vbs script to close and reopen an access file
I need to manage the code on an external access file that acts as a control of the lock situation verified on the main file which must then be closed and reopened from Db A I close and reopen the Db...
tims
Dec 02, 2021Copper Contributor
It appears you are trying to kill the Ship.accdb file before it's opened. Should the order of these two lines be swapped? Or is the DB A file also called Ship?
Print #1, "shell.run ""taskkill /fi """"WINDOWTITLE eq Access - Ship*"""""""
Print #1, "shell.run """"""" & "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE"""" """"" & Application.CurrentProject.Path & _
"\Ship.accdb"""""""
Print #1, "shell.run ""taskkill /fi """"WINDOWTITLE eq Access - Ship*"""""""
Print #1, "shell.run """"""" & "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE"""" """"" & Application.CurrentProject.Path & _
"\Ship.accdb"""""""