Hyperlink to open pdf file

  • Thread starter gmazza via AccessMonster.com
  • Start date
G

gmazza via AccessMonster.com

Hi there,
I have a Hyperlink field in my table called LinkedFile.
I need 2 things to happen on my form.
When the user clicks on a hyperlink already in the LinkedFile field, I need
it to open the actual file they clicked on. Right now they click on the
hyperlink which does point to an actual file and it only opens the folder,
not the file. I need the file open.

Finally, on the form if there is no hyperlink in the LinkedFile field, I want
the user to be able to drill down for one, instead of typing it in. They
should be able to browse for one. Is there a default directory I can set it
to?

Any help is appreciated, thanks!
 
D

Dale Fye

if the hyperlink is only taking you to the folder, chances are that the value
in the field does not include the full file name. Make sure that the path
and filename are valid.

To use the Windows Open/Save file dialog to select a file, I'd recommend you
check out the code at: http://www.mvps.org/access/api/api0001.htm

Calling this code will open the windows open/save file dialog and allow you
to select a file that way. There are a number of optional parameters with
this, so feel free to play around.

BTW, I generally don't use "hyperlink" fields, I find them to be more
trouble than they are worth. Instead, I use a text field to store the
path/file name, and then either use a command button or the textboxes double
click event and the application.followhyperlink method to open the selected
file.
 

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