Hyperlink to PDF from Access Tables (1 Viewer)

velcrowe

Registered User.
Local time
Yesterday, 23:22
Joined
Apr 26, 2006
Messages
86
I have hyperlinks to my orders folder, all of which are PDF files. When I click the hyperlink it appears as if Abobe Acrobat will open but it disappears. I am not too familiar with the Shell Command but how can I use it and where would I place the code to open all of my pdf files from the Access database?

:) Thank yo
 

Mike375

Registered User.
Local time
Today, 13:22
Joined
Aug 28, 2008
Messages
2,548
Don't know why hyperlink is causing you a problem. Is the PDF file opening but minimised. I don't have the Shell() for PDF but try this for hyperlink.

Firstly, place the names of your PDF files in an Access table and then make a continuous form for that table. Place a button on the record part of the form, that is, the row, not the header or footer and put this on the OnClick event

Forms!ln!Command5.HyperlinkAddress = ("C:\StoreLetters\" & ([Forms]![ln]![LNameNoDoc]) + ".pdf")

Obviously you need to change it for the names of your folder and command button. The reason I have + ".pdf") is because I strip the extension of the file for my own reasons. Clicking the button will set the hyperlink address as well as open the relevant pdf file and it will also by pass the security warning.

If you have a lot of PDF files then you could use Allen Browne's ListFiles to a Table function to get all the file names to an Access table. If you don't want to have all the PDF files in one folder the you can change the above so that the \StoreLetters part is also drawn from the entry on the Access table. Allen Browne's function initially places th full part of the file into the table.

If someone does not come along with Shell() for PDF then just search on google.

Here is the link to Allen Browne's function. A few lines down you will see the list to table.

http://allenbrowne.com/ser-59.html

One other thing you might try if you are having hyperlink/PDF problems is to reinstall Acrobat Reader as I seem to remember reading sometime ago about a similar problem to your and reisntall Acrobat fixed it
 
Last edited:

Users who are viewing this thread

Top Bottom