I am trying to have Access open PDF's via hyperlinks in a query, but from a command button on a form. It actually opens the correct record in datasheet view, and can then click the hyperlink to open in Acrobat, but get an error "Unable to open Query!qryLithLogLinks![Lith_Logs]. Cannot open the specified file". I have enabled these references: Adobe Acrobat 8.0 Type Library, Acrobat Access 3.0 Type Library, Adobe Acrobat 8.0 Browser Control Type Library 1.0. What I would really prefer it do is open either a folder (from hyperlink path in query) or PDF (with default application), as some of the records may or may not not have an associated PDF.
Code:
Private Sub Command59_Click()
Dim ObjPdfApp As Object
Set ObjPdfApp = CreateObject("AcroExch.App")
DoCmd.OpenQuery ("qryLithLogLinks")
End Sub
Code:
Private Sub Command59_Click()
Dim ObjPdfApp As Object
Set ObjPdfApp = CreateObject("AcroExch.App")
DoCmd.OpenQuery ("qryLithLogLinks")
End Sub