hyperlink to a folder in a form

benjamin.grimm

Registered User.
Local time
Yesterday, 23:19
Joined
Sep 3, 2013
Messages
125
hey guys,

i put in contracts in a form in Access.

Each contract has a Special ID. it´s called mietvertragsnummerID (German Word).

Now i want by pressing a button, that for the choosen ID, a pdf, which gets saved in a seperate Folder, gets opened.

So i have the ID 18. (in the form in Access)

In the Folder M:\FB\Grimm\SuW was saved the contract with the Name:

Mietvertrag18.

I´ve created the follwing code, but it doesnt work

Code:
Private Sub Befehl4065_Click()
 Dim sPath As String
      sPath = "\M:\FB\Grimm\SuW" & "Mietvertrag" & Me.MietvertragsnummerID & ".pdf"
 
End Sub

Best greetings

benjamin
 
Use Application.FollowHyperlink
Code:
Private Sub Befehl4065_Click()
    Dim sPath As String
    sPath = "\M:\FB\Grimm\SuWMietvertrag" & Me.MietvertragsnummerID & ".pdf"
    Application.FollowHyperlink sPath
End Sub
 

Users who are viewing this thread

Back
Top Bottom