PC Review


Reply
Thread Tools Rate Thread

Cannot pass Parameters using OpenCurrentDatabase

 
 
ThomasAJ
Guest
Posts: n/a
 
      21st Feb 2009
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.
--
Regards
Tom
 
Reply With Quote
 
 
 
 
ThomasAJ
Guest
Posts: n/a
 
      21st Feb 2009
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?

--
Regards
Tom


"Chris O'C via AccessMonster.com" wrote:

> Opencurrentdatabase doesn't allow command line arguments. Use shell function
> instead. Look in Access help for the rules and examples.
>
> Chris
>
>
> ThomasAJ wrote:
> >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.

>
> --
> Message posted via http://www.accessmonster.com
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass more than 2 parameters in C# dondigitech LaPel Microsoft C# .NET 1 31st Oct 2008 05:51 PM
Is It Possible To Pass Parameters to A Pass Through Query mcl Microsoft Access Queries 3 21st Sep 2007 01:15 AM
Pass Parameters To Sub rn5a@rediffmail.com Microsoft ASP .NET 0 7th Nov 2006 03:42 PM
Pass parameters to a PPC VB .NET app =?Utf-8?B?RXZl?= Microsoft Dot NET Compact Framework 2 11th Apr 2005 03:03 PM
Pass a lot of parameters? nick Microsoft C# .NET 8 7th Feb 2005 07:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:40 AM.