fourofclubs
Programmer
I'm trying to display a pdf on a form using the Adobe ActiveX control (in MSAccess 97). I'm using a check box to control whether the pdf is displayed or not.
The code in the click event for the check box is as follows:
This works to display the pdf, but the problem arises if the file is loaded twice (if, for example, the check box is clicked to show the pdf, again to hide it, and then again to display it again). I end up getting an "access violation" error message which shuts down Access completely. The same thing happens if I try to open the properties for the ActiveX control.
Any help on this would be greatly appreciated.
The code in the click event for the check box is as follows:
Code:
If [chkShowPDF] Then
[PDFframe].src = [PDFName]
Else
[PDFframe].src = ""
End If
This works to display the pdf, but the problem arises if the file is loaded twice (if, for example, the check box is clicked to show the pdf, again to hide it, and then again to display it again). I end up getting an "access violation" error message which shuts down Access completely. The same thing happens if I try to open the properties for the ActiveX control.
Any help on this would be greatly appreciated.