View a PDF from Access (1 Viewer)

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:03
Joined
Aug 30, 2003
Messages
36,118
Now you have the path twice. Try the line in post 2 after putting just the file name in the variable.
 

Dangerous

Registered User.
Local time
Today, 10:03
Joined
Oct 18, 2018
Messages
73
Yeah realised that but it still didn't work till I change it to

Private Sub Label1689_Click()

Dim strPDFfile As String
strPDFfile = "D:\MDF Database\Images" & PDFfile

Application.FollowHyperlink strPDFfile


End Sub


PDFfile (controlname) instead of strPDFfile.

Works fine now.
 

Dangerous

Registered User.
Local time
Today, 10:03
Joined
Oct 18, 2018
Messages
73
Thanks for all the help everyone.
 

Dangerous

Registered User.
Local time
Today, 10:03
Joined
Oct 18, 2018
Messages
73
I spotted the errors by adding a hyperlink field and assigning the strPDFfile variable to it. I then saw what was happening and corrected the errors.

I'm learning, slowly but learning. Thanks again.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:03
Joined
Aug 30, 2003
Messages
36,118
Glad you got it working.
 

Users who are viewing this thread

Top Bottom