How to browse and insert link to file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello..

How can I setup a button to browse a director and pick a file. Then what
I would like is it to store the file name in a field within a form. Is this
possible. I realize this is probably going to be over my head but if someone
could take the time.

Here is how I would like it to look.

User pushes a button, windows browser opens up.. user goes to the location
of file selects the file and then when the file is selected the link is
stored in a field. There could be multipal links so I have the fields setup
as followed.

tblLinks
LinkID
EntryNumber(pk linked to main table)
Links

So I can store multipal links for each file. Now I just need to do the
browsing and inserting of link..

thanks
Rhett
 
If you use a field of type Hyperlink, your button's Click event procedure
can contain just:
Me.[MyHyperlinkFieldNameHere].SetFocus
RunCommand acCmdInsertHyperlink
If hyperlink fields are new, see:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html

If you want something more powerful, can can use an API call to open the
Windows File Open dialog. See:
Call Windows File Open/Save Dialog box
at:
http://www.mvps.org/access/api/api0001.htm
 
Back
Top