A
Arturo
I used to use a script to close one Access DB and then
open another. The script is as follows:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'MSAccess.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Set objShell = CreateObject("WScript.Shell")
objShell.Run "MSAccess.exe C:\Folder 1\File 1.mdb"
I do have spaces in the names but it never mattered before.
I run it and keep getting the message that an incorrect command
was used to open access. Anybody know what is wrong or do you
have another script?
Thank you.
open another. The script is as follows:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'MSAccess.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Set objShell = CreateObject("WScript.Shell")
objShell.Run "MSAccess.exe C:\Folder 1\File 1.mdb"
I do have spaces in the names but it never mattered before.
I run it and keep getting the message that an incorrect command
was used to open access. Anybody know what is wrong or do you
have another script?
Thank you.