L
Leslie Isaacs
Hello All
I have lot of statements similar to the following:
rptname = "rpt monthly summary letter"
flname = mth & "-Payroll-Covering letter"
blret = ConvertReportToPDF(rptname, vbNullString, drname & flname &
".pdf", False)
Each statement uses a different report.
For each report I have the 'OnNoData' event set to Cancel = True, but I want
to prevent the error message from being displayed when there is no data for
a report. When the report is generated by clicking a button I can add
If Err = 2501 Then Err.Clear
to the OnClck event of the button, and this prevents the message from being
displayed, but the same thing doesn't work where the report is generated by
the above code. Is there another way of preventing the error message from
being displayed when there is no data for a report?
I hope someone can help.
Many thanks
Les
I have lot of statements similar to the following:
rptname = "rpt monthly summary letter"
flname = mth & "-Payroll-Covering letter"
blret = ConvertReportToPDF(rptname, vbNullString, drname & flname &
".pdf", False)
Each statement uses a different report.
For each report I have the 'OnNoData' event set to Cancel = True, but I want
to prevent the error message from being displayed when there is no data for
a report. When the report is generated by clicking a button I can add
If Err = 2501 Then Err.Clear
to the OnClck event of the button, and this prevents the message from being
displayed, but the same thing doesn't work where the report is generated by
the above code. Is there another way of preventing the error message from
being displayed when there is no data for a report?
I hope someone can help.
Many thanks
Les