Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Line Switch not working

Status
Not open for further replies.

neemi

Programmer
May 14, 2002
519
GB
I am using Access 2003 to open up a db via a shortcut which has a command line switch /cmd ASK but it is not working!

The db opens up and it is as though the command line was not set on the shortcut target!

I was wondering if anyone has had this problem and if you have any suggestions as to why it is not working?

Macro security etc?

Please advise.
Cheers,
Neemi
 
This works for me:
1) shortcut's target:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\path\to\mydb.mdb" /cmd ASK

2) VBA code:
MsgBox Command$

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
thanks for the reply but I got it working in the end by specifying the path of access. Not sure if the prob was because they had 2 versions of access on the pc or just because of the default version! But as long as it is working!
cheers for replying anyway.
Neemi
 
do u know how I can pass a second command....

is the correct format simply...
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\path\to\mydb.mdb" /cmd 1stSwitch 2ndSwitch

??


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top