Hi all,
I have a Adobe PDF Reader , active x control loaded on a form. And would like it to show the PDF a file when a button is clicked.
The following code works, if you want to view outside access, but I don't. Can anyone have a look and tell me how I can link the button to the active x component .
I keep getting an error with Set oApp = ([AcroPDF5])
Thank you
I have a Adobe PDF Reader , active x control loaded on a form. And would like it to show the PDF a file when a button is clicked.
The following code works, if you want to view outside access, but I don't. Can anyone have a look and tell me how I can link the button to the active x component .
I keep getting an error with Set oApp = ([AcroPDF5])
Code:
Private Sub ViewPDFButton_Click()
Dim oApp As Object
Set oApp = ([AcroPDF5])
oApp.Visible = True
oApp.ChangeFileOpenDirectory "D:"
oApp.Documents.Open FILENAME:=Me.ViewReportDetails & " "
End Sub