It sure seems like you are doing a lot of extra work.......
I have printed out a run of 620 PDFs without any error message.
I cut your code down to the minimum and did the same with mine:
Your code:
Code:
Do While Not CustomerEmailAddress.EOF
DoCmd.OpenReport strReport, acViewReport
Reports(strReport).Filter = "[Address_No] =" & Chr(34) & CustomerEmailAddress!Customer & Chr(34)
Reports(strReport).FilterOn = True
DoCmd.Save acReport, strReport
DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, "D:\Overdue Account.pdf"
DoCmd.Close acReport, strReport
Loop
My code:
Code:
Do Until r.EOF
Me.ubEndPK = r("END_PK")
DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, "D:\EmpAccount.pdf", False
r.MoveNext
Loop
My code actually creates a unique PDF name for every PDF. I cut that out to make the code samples more equal when comparing.
My report record source is a query with 5 criteria. One of the criteria changes for every person - the hidden "ubEndPK" control.
The OutputTo method knows it is outputting a report, knows the report name and knows the save as format. The report is opened (hidden), the record source query gets the criteria from the form, the PDF is created and saved. Done... Move on to the next.