Cannot pass Parameters using OpenCurrentDatabase

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.
 
T

ThomasAJ

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top