Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2005

Tip: Looking for answers? Try searching our database.

Open files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Creator7 - 07 Dec 2005 21:50 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.