By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,909 Members | 2,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,909 IT Pros & Developers. It's quick & easy.

Access Command Line Open Specific Record

P: n/a
Hello all. I have a database that I use to send email updates to
people. Everything is working fine, but one suggestion I keep getting
is to add a link to the automatic emails that will open up the
database, then open to the correct form and record. I can write a
simple macro to open a form and a specific record, but what I can't
figure out is how can I get that speciic record number in a command
line link?

Here's an example...

<EMAIL>
Dear John,
Mary just started a new report: Report 2005-024. Click Here to
view Report 2005-024.

Thank You!
</EMAIL>

I would like John to be able to "Click Here" to open up the database,
then open the correct Report. All users are within the same building,
using the same email system (Lotus Notes) and the same version of
Access (2002). Does anyone have any ideas how I can do this?

Possibly something like this...
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE /x
openReport('2005-024')

Thank You!

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
This may be what you're after. From the help file:

/cmd
Specifies that what follows on the command line is the value that will be
returned by the Command function. This option must be the last option on the
command line. You can use a semicolon (;) as an alternative to /cmd.

Use this option to specify a command-line argument that can be used in
Visual Basic code.

Next, in VBA you would use the Command function to access this information.

--
Wayne Morgan
MS Access MVP
"Chris" <ch***@chriswilliams.net> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hello all. I have a database that I use to send email updates to
people. Everything is working fine, but one suggestion I keep getting
is to add a link to the automatic emails that will open up the
database, then open to the correct form and record. I can write a
simple macro to open a form and a specific record, but what I can't
figure out is how can I get that speciic record number in a command
line link?

Here's an example...

<EMAIL>
Dear John,
Mary just started a new report: Report 2005-024. Click Here to
view Report 2005-024.

Thank You!
</EMAIL>

I would like John to be able to "Click Here" to open up the database,
then open the correct Report. All users are within the same building,
using the same email system (Lotus Notes) and the same version of
Access (2002). Does anyone have any ideas how I can do this?

Possibly something like this...
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE /x
openReport('2005-024')

Thank You!

Nov 13 '05 #2

P: n/a
Thanks for your reply, but I am not sure exactly how to do what you
have explained.

I just want to make sure I get this right.

In the email have a link similiar to this?
C:/Program Files/MSAccess.exe /x openReport /cmd 2005-024

I am not sure how to get the 2005-024 from the email to the database.
Can you please explain a little more?

Thanks!

Nov 13 '05 #3

P: n/a
I don't know how to get the information out of the email. The folks in the
Outlook newsgroup may be able to help you. This was just simply a method of
getting information into Access via the command line as you open it. If you
have the information you need to know which record to go to, you could pass
this information in via the command line. Check for the value in the Load
event of your startup form and move to the record.

--
Wayne Morgan
MS Access MVP
"Chris" <ch***@chriswilliams.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Thanks for your reply, but I am not sure exactly how to do what you
have explained.

I just want to make sure I get this right.

In the email have a link similiar to this?
C:/Program Files/MSAccess.exe /x openReport /cmd 2005-024

I am not sure how to get the 2005-024 from the email to the database.
Can you please explain a little more?

Thanks!

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.