using a hyperlink in outlook to open a specific record in ms acces

E

EricB

Does anybody has any sample on how to open an access db and open a specific
record that is specified in the line argument of the cmd function? I have
created a routine in access that send an-email using outlook automation but
the only thing that remains is the hyperlink that needs to open a form with a
specific record specified in the line argument /cmd recid. Any hekp or
directiosn is most appreciated. Eric.
 
D

dch3

There's a command line switch that will execute a macro upon startup. You'll
need to include that and use the /cmd to pass in the information. The macro
will need to use the RunCode() function to execute whatever function you
design. Basically the function will look like this. If you have an AutoExec
macro, you may have to build in the code at that point to bypass whatever
normally happens at startup. That can be done by simply testing if a string
was passed in using the /cmd switch. In that event, you can ignore the switch
that calls a specific macro to run.

Public Function showRecordOnStartup()

DoCmd.OpenForm [formName] .... [whereStatement]

end function

I don't remember all of the parameters for .OpenForm off the top of my head
but that's pretty much it. You will need to build the where statement using a
statement such as

strWhereStatement = "[keyField] = '" & [command line string] & "'"

Again, I don't remember the specific syntax for returning the value passed
in via /cmd.
 
Joined
Jul 24, 2009
Messages
1
Reaction score
0
Similar problem

I know this is a late reply, but I have a very similar problem with hyperlinks. I would like to create a hyperlink to place in an email that will open an Access database form and display a specific record, based on the record ID. Is this possible? The backgound is that I have a database tracking issues. A report is generated weekly that goes out and includes the issue name and ID. What I want to include is a link specific to the issue that will allow the receiver to click on it and it will open the database and take them to the specific record. Any help you can provide would be great.
 

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