I have a command button on a form that looks in a text box for a file name, and uses the code below to open the corresponding PDF:
Private Sub Command82_Click()
Application.FollowHyperlink CurrentProject.Path & "\References\" & Me![PDF Link].Value & ".PDF"
End Sub
I have made it a relative...
I'm not sure. The path seems to be in the "\\server\share" format, but I also have mapped it onto my desktop.
Is there a more robust way of doing relative links in access, so it never matters where the files are stored, as long as their relative position to the database is maintained?
Thanks for everyone's help. I have it working now. But...
The command button now works fine on my computer, but the database is stored on a shared drive (as is the folder I am asking it to refer to) and the link doesn't work for someone else using the database on a different computer. On...
Thanks. Forgive my ignorance, but what is the actual code that I need to put in place of IDAuthorDate so that it uses the text stored in a text box called "PDF link"? With the text as it is, it just tries to open "C:\References\.pdf", rather than, say, "C:\References\137Smith1999.pdf" when...
I'm sure this has been explained elsewhere but I can't seem to find it. I am using Access to store a number of academic references. I have a form that displays each reference's unique ID and various pieces of information about it.
I am storing all the pdfs in a folder called "C:\References"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.