ActiveX control not working
I have a form “InvoicesForm” with a subform “AttachedPDFForm” that displays PDF names. The subform displays the names of PDFs in a text control named PDFName and has a button to View PDF with the following code:
Dim filepath As String
filepath = "C:\Users\nevadamax\OneDrive\Documents\PMPlus" & Forms![InvoicesForm]![AttachedPDFForm].Form![PDFName]
DoCmd.OpenForm "ViewItPDFForm", , , , , acDialog
When the form “ViewItPDFForm” is opened, it has two controls filer and ViewPDF. Filer is a text box and correctly displays the full path to the PDF. ViewPDF is an AdobePDF Reader ActiveX control.
The OnOpen of ViewItPDFForm has the following code:
Me!filer = "C:\Users\nevadamax\OneDrive\Documents\PMPlus" & Forms![InvoicesForm]![AttachedPDFForm].Form![PDFName]
Me!ViewPDF.src = "C:\Users\nevadamax\OneDrive\Documents\PMPlus" & Forms![InvoicesForm]![AttachedPDFForm].Form![PDFName]
I have installed Adobe Reader.
However, no PDF is displayed. What am I doing wrong???