T
ThomasAJ
Rather than answering my own post further down I thought I'd post a new
question to help others.
After trying various combinations of "path\MSaccess.exe" "path\myDB.MDB"
/cmd "Event" DIRECTLY into Task Scheduler
AND
In a VBSCRIPT I tried: (don't get too hung up on the correct "quote" numbers)
set accessApp = createObject("Access.Application")
accessApp.OpenCurrentDataBase("path\myDB.MDB" /cmd "Event")
AND also
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "C:\Program Files (x86)\Microsoft
Office\OFFICE11\MSACCESS.EXE"" "path\myDB.MDB" /cmd "Event"
I finally got it right with:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """C:\Program Files (x86)\Microsoft
Office\OFFICE11\MSACCESS.EXE"" ""path\myDB.MDB"" /cmd ""Event"""
The above quote numbers are correct.
The failed attempts' quote numbers are not the problem (I tried many
different combinations). The problem is they cannot handle passing
parameters/arguments to MSACCESS.EXE along with the 'called' MDB.
The biggest surprise is that the method 'OpenCurrentDataBase' cannot pass
parameters. What were they thinking? (er long Friday lunch I suspect...coke
and pizza eh)
question to help others.
After trying various combinations of "path\MSaccess.exe" "path\myDB.MDB"
/cmd "Event" DIRECTLY into Task Scheduler
AND
In a VBSCRIPT I tried: (don't get too hung up on the correct "quote" numbers)
set accessApp = createObject("Access.Application")
accessApp.OpenCurrentDataBase("path\myDB.MDB" /cmd "Event")
AND also
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "C:\Program Files (x86)\Microsoft
Office\OFFICE11\MSACCESS.EXE"" "path\myDB.MDB" /cmd "Event"
I finally got it right with:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """C:\Program Files (x86)\Microsoft
Office\OFFICE11\MSACCESS.EXE"" ""path\myDB.MDB"" /cmd ""Event"""
The above quote numbers are correct.
The failed attempts' quote numbers are not the problem (I tried many
different combinations). The problem is they cannot handle passing
parameters/arguments to MSACCESS.EXE along with the 'called' MDB.
The biggest surprise is that the method 'OpenCurrentDataBase' cannot pass
parameters. What were they thinking? (er long Friday lunch I suspect...coke
and pizza eh)