Store files in the DB which are associated with specific records

B

BZeyger

Is there a way to incorporate a feature into my access 2003 VBA database? I
want to have a user click a button and then a dialog box would appear asking
to navigate to a .pdf file. Once the user selects the pdf file, it would be
stored in the database under the selected record. Are there examples of this
in use in which I can view the code?
 
D

Dorian

You cannot store a PDF file in an Access database. What you can do is to
store the path to the file, so you can hyperlink to the file. Of course if
the file gets moved the link is broken...
You need to make sure you link to a file that other users can access, e.g.
if you use mapped drive letters, other users may have their drives mapped
differently, so you should alwatys map to the server directly e.g.
\\server-name\folder-name\file-name
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
B

BZeyger

Is there an example of this in use? I would like the user to click a command
button and navigate to the file location. Once that is done, the location
would be stored in a table named Issues under the Location field.

I was goven the website : http://www.mvps.org/access/api/api0001.htm
However, I was confused and could not get this to work
 
B

BZeyger

I beleive that is what I want to do. However, I would like to find an easy
way for a user to store a specific file location.
 
D

Dorian

I dont have an example to hand.
Obviously you need to store the paths in a table column.
Then you need to display a selection list of these columns in either a combo
box or listbox.
Selecting from the combo box or listbox and clicking your button would
hyperlink to the file.
Look up hyperlinks in Access Help for more information.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 

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