Cannot pass Parameters using OpenCurrentDatabase

  • Thread starter Thread starter ThomasAJ
  • Start date Start date
T

ThomasAJ

I have tried all sorts of double and single quote combinations but no way can
I passcommand line parameters to the database being opened.

eg
Set accessApp = CreateObject("Access.Application")
accessApp.OpenCurrentDatabase ("""Path\Task.mdb"" /cmd ""Event1""")
OR
accessApp.OpenCurrentDatabase ("'Path\Task.mdb' /cmd 'Event1'")

I keep getting an error message that the MDB is missing.
 
Oh...I want to run my Access app via Task Scheduler but I could not manage to
pass command line paramteres there so I tried a VBSCRIPT using
OpenCurrentDatabase. It failed also so I tried to pass parameters using
OpenCurrentDatabase within another Access program to see if command line
parameters worked. Hence this question.

OK so how does one pass command line parameters when running an Access app
in Task Scheduler OR a VBSCRIPT?
 
Back
Top