Good day,
I hoping someone will be able to help me here, I need to be able to tell specific reports to print to specific printers within our organisation, without having to go through the motions of individually selecting the report and printer.
This is the code I currently have, which works fine when only one printer is the default
==================
START OF CODE
==================
'If the tblLetterRunDGI table has records in it then
If DCount("*", "tblLetterRunDGI2") > 0 Then
'Print the DGI rptLetterRun Report
DoCmd.OpenReport "rptLetterRunDGI", acNormal, "", ""
End If
'If the tblLetterRunDGS table has records in it then
If DCount("*", "tblLetterRunDGS2") > 0 Then
'Print the DGS rptLetterRun Report
DoCmd.OpenReport "rptLetterRunDGS", acNormal, "", ""
End If
'If the tblLetterRunSky table has records in it then
If DCount("*", "tblLetterRunSky2") > 0 Then
'Print the Sky rptLetterRun Report
DoCmd.OpenReport "rptLetterRunSky", acNormal, "", ""
End If
'Print the rptDailyLetterCount report
DoCmd.OpenReport "rptDailyLetterCount", acNormal, "", ""
==================
END OF CODE
==================
Does anyone know how I can direct the reports to different printers using VBA
Your assistance would be most appreciated.
John
I hoping someone will be able to help me here, I need to be able to tell specific reports to print to specific printers within our organisation, without having to go through the motions of individually selecting the report and printer.
This is the code I currently have, which works fine when only one printer is the default
==================
START OF CODE
==================
'If the tblLetterRunDGI table has records in it then
If DCount("*", "tblLetterRunDGI2") > 0 Then
'Print the DGI rptLetterRun Report
DoCmd.OpenReport "rptLetterRunDGI", acNormal, "", ""
End If
'If the tblLetterRunDGS table has records in it then
If DCount("*", "tblLetterRunDGS2") > 0 Then
'Print the DGS rptLetterRun Report
DoCmd.OpenReport "rptLetterRunDGS", acNormal, "", ""
End If
'If the tblLetterRunSky table has records in it then
If DCount("*", "tblLetterRunSky2") > 0 Then
'Print the Sky rptLetterRun Report
DoCmd.OpenReport "rptLetterRunSky", acNormal, "", ""
End If
'Print the rptDailyLetterCount report
DoCmd.OpenReport "rptDailyLetterCount", acNormal, "", ""
==================
END OF CODE
==================
Does anyone know how I can direct the reports to different printers using VBA
Your assistance would be most appreciated.
John