I have an access application that I downloaded that has some nice code for having MS Access Reports being automatically printed as PDFs. The code works fine but I have a report that I tried to print as a pdf but it doesn't go anywhere and it doesn't automatically bring up adobe. The report in question is called 'Employees Reports'. I have attached the database along with the 2 .dll files in question.
What I need is the ability of this Employees Report (it contains images) to be able to be printed as a pdf.
I can print other MS Access Reports as PDFs but I am not able to print this one as you can see when you open the form in the attached database 'HowToUse'.
It appears that the problem is that when the Employees Report in MSAccess is converted to a SNP file extension, it doesn't open up the adobe application to show the report. I believe the real problem is in the Employees Report itself. There is some VBA code in the detail section of the Report that I think is causing this Access Report to PDF to not work.
Here is the code that is preventing this report to be converted to a pdf...
Me.PhotoImage2.Picture = Me.FileList2
This line is embedded in the following code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim PhotoImage2 As String
Dim FileList2 As String
'DoCmd.OpenReport stDocName, acNormal
If IsNull(Me.PhotoImage2.Picture) Then
DoCmd.SetWarnings False
Else
Me.PhotoImage2.Picture = Me.FileList2
End If
End Sub
Objective: To somehow get the Employees Report to print as a pdf. I believe with the code in the details section is it preventing this from happening but the problem is if I remark it out, it the Employees Report will print to a PDF but I will lose the associated image.
What I need is the ability of this Employees Report (it contains images) to be able to be printed as a pdf.
I can print other MS Access Reports as PDFs but I am not able to print this one as you can see when you open the form in the attached database 'HowToUse'.
It appears that the problem is that when the Employees Report in MSAccess is converted to a SNP file extension, it doesn't open up the adobe application to show the report. I believe the real problem is in the Employees Report itself. There is some VBA code in the detail section of the Report that I think is causing this Access Report to PDF to not work.
Here is the code that is preventing this report to be converted to a pdf...
Me.PhotoImage2.Picture = Me.FileList2
This line is embedded in the following code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim PhotoImage2 As String
Dim FileList2 As String
'DoCmd.OpenReport stDocName, acNormal
If IsNull(Me.PhotoImage2.Picture) Then
DoCmd.SetWarnings False
Else
Me.PhotoImage2.Picture = Me.FileList2
End If
End Sub
Objective: To somehow get the Employees Report to print as a pdf. I believe with the code in the details section is it preventing this from happening but the problem is if I remark it out, it the Employees Report will print to a PDF but I will lose the associated image.