Greetings,
I have 4 reports with VBA code behind them that checks boxes on each report based on a table value for each row.
I am able to pull up each report manually and print to the printer.
The problem:
I added the 4 reports to a macro to open report and print.
Then added a button to a form to run the macro.
The macro doesn't print the reports, it opens a print dialog box and appears to send a job to the printer for each report. But nothing actually prints.
Here is the embedded code for one of the reports. As stated, this code works when the reports are pulled manually.
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' TYPE_CODE B1
Set current_report = Application.Reports(Application.CurrentObjectName)
With current_report
strArr = Split(!txtDenials, "|")
'!Check4.Visible = False
!Check5.Visible = False
!Check6.Visible = False
!Check7.Visible = False
!Check77.Visible = False
!Check9.Visible = False
!Check11.Visible = False
!Check13.Visible = False
!Check165.Visible = False
For i = 0 To UBound(strArr) - 1
Select Case strArr(i)
Case "004"
!Check165.Visible = True
Case "005"
!Check5.Visible = True
Case "006"
!Check6.Visible = True
Case "007"
!Check7.Visible = True
!Check77.Visible = True
Case "009"
!Check9.Visible = True
Case "011"
!Check11.Visible = True
Case "013"
!Check13.Visible = True
Case "015"
!Check6.Visible = True
Case "165"
!Check165.Visible = True
Case Else
End Select
Next i
End With
End Sub
Private Sub Report_NoData(Cancel As Integer)
Cancel = True
End Sub
+++++++++++++++++++++++++++++++
Any help would be appreciated, thanks alot!