Command Line Switch in a hyperlink?

S

Suzie H.

I have a submit button on my form that will send an Outlook email to a
person. I want the email to contain a link that will open the
database and pass the record ID back to access so I can open a form to
that record.

I know that I can use the /CMD switch to pass the record ID so that it
can be retrieved using the Command() function.

I have been successful in using the Start --> Run... box to manually
open the database using this syntax:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:
\Documents and Settings\User\Desktop\MyDatabase.mdb" /cmd 27

where the number 27 is the value I want to pass.

What is the syntax of a hyperlink in an email to do the same thing?
I am using:
<file://C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE C:
\Documents and Settings\User\Desktop\MyDatabase.mdb /cmd 27>

When I click on it I get a Can not find file error message.

Help!
Suzie H.
 
W

Wayne-I-M

/"X" cmd 27

"Without the quotes"

You may be better using an autoexec macro to the task - up to you though
 
S

Suzie H.

/"X" cmd 27

"Without the quotes"

You may be better using an autoexec macro to the task - up to you though

Thank you Wayne.
I understand, but even with a macro, i would need to pass a parameter
so the correct record would open. My main problem is simply with the
hyperlink syntax. Even when I use your suggestion, it still does not
work. I am stumped.

What is the correct syntax for an email hyperlink to open Access and
pass a value?

Suzie H.
 
S

Suzie H.

The cmd switch goes "at the end of the  path"

There is lots of samples available (google) - it depends on what you needto
do after the app is opened.

X/cmd ......ect

a few tips here

http://www.wingspan.info/Access/CommandlineSwitches/Default.aspx#cmds...

Sorry no time this week - hope someone will jump in to the thread - off to
Rome in about 10 mins

Again, thank you Wayne for your reply!

My main problem is not with using the Command Line switches, but with
creating an **Email Hyperlink** that uses the command line so that it
can be clicked, Access opens and the software can read the /cmd value.

Suzie H.
 

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