I have created a form in my database which I allow users to attach supporting
documentation.
When the documents are attached I change the file name to include the record
ID number, date attached, revision level and then copy the file to a
controlled location on my server. I then only store the file path in Access
to keep the database small and fast.
When the user wants to view the file they select the name from a listbox
with writes the file path as a hyperlink code into a command button. Then the
user clicks the command button to open and view the attachment.
Q1: How could I write the code so when the user double clicks the list box
the file is opened in its correct application without the intermediate step
of clicking the command button?
Douglas J. Steele - 07 Dec 2005 22:54 GMT
You can use the FollowHyperlink method in the listbox's double click event,
or you can use the ShellEx API. See
http://www.mvps.org/access/api/api0018.htm at "The Access Web" for a sample
of the latter.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I have created a form in my database which I allow users to attach
>supporting
[quoted text clipped - 16 lines]
> step
> of clicking the command button?