HYPERLINK TO DOCUMENT

  • Thread starter Thread starter Developerme
  • Start date Start date
D

Developerme

I use Access 2007. What I want to do is to open a form that allows the user
to select a document they wish to save the location of. What I need is the vb
code that would allow the user to select the location of the document and
then vb code would save the exact location in the database. Then, the user
can use a dropdown that would pull up the document that was saved in that
location. Anyone have any ideas?
 
In addition to Jacks' comment, I would store the filename and path to a text
field in your database. Then, use a command button or double click event to
open the file; something like:

Private Sub cmd_OpenFile

on error goto OpenFileError

if LEN(me.txt_FileName & "") > 0 then
application.followhyperlink me.txt_FileName
endif

Exit Sub

OpenFileError:
msgbox err.number & vbcrlf & err.description,, _
"Error encountered while following hyperlink"
End Sub

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
Back
Top