ActiveX control not working

Maxine Nietz 1 Reputation point
2024-05-29T16:27:39.9666667+00:00

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???

 

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
848 questions
{count} votes