Linked PDF Within Access Record

A

arnold

I have a folder of scanned applications on a network drive. Each
application is named the same as the ID in each Access record. What I
would like to do is link to the appropriate file automatically using
the ID found in the record. I would also like to place a button or a
hyperlink that will allow the user to click on it and go directly to
the application. I am relatively inexperienced with Access and have
been asked by my manager to figure this out. Any help would be
appreciated!
 
D

Dirk Goldgar

arnold said:
I have a folder of scanned applications on a network drive. Each
application is named the same as the ID in each Access record. What I
would like to do is link to the appropriate file automatically using
the ID found in the record. I would also like to place a button or a
hyperlink that will allow the user to click on it and go directly to
the application. I am relatively inexperienced with Access and have
been asked by my manager to figure this out. Any help would be
appreciated!


In principle, you can use the FollowHyperlink method to open the
corresponding document. For example, you could have a command button with a
Click event procedure along these lines:

'----- start of example code -----
Private Sub cmdOpenApplication_Click()

Dim strFolderPath As String

'*** Change this line appropriately:
strFolderPath = "N:\Your\Network\Drive\And\Folder\"

If Not IsNull(Me!ID) Then

Application.FollowHyperlink strFolderPath & Me!ID & ".pdf"

End If

End Sub
'----- end of example code -----
 
A

arnold

Thanks! It worked like a charm! I added a new window command and it
is exactly what we needed. We even modified the code to use on other
commands. Thanks again!
 

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