HKFuey
asked on
Access output report fails with no error
I have this VBA
strTempFile = "C:\OrderAck\OrderAck" & strCurrentOrder & Format(Date, "DD-MM-YYYY") & ".pdf"
DoCmd.OutputTo acOutputReport, "rpt_Automail", "*.pdf", strTempFile, False
Was working fine, now just ends on the Docmd without any error (I do have an err trap)
Anybody got any Ideas?
strTempFile = "C:\OrderAck\OrderAck" & strCurrentOrder & Format(Date, "DD-MM-YYYY") & ".pdf"
DoCmd.OutputTo acOutputReport, "rpt_Automail", "*.pdf", strTempFile, False
Was working fine, now just ends on the Docmd without any error (I do have an err trap)
Anybody got any Ideas?
ASKER
I found the issue, If I try open the report manually it threw an error. In the footer there was some formatting code that was based on the number of lines in an order, it crashed when it came across an order with no lines.
So it was the report code that crashed, that's why I got no error.
So it was the report code that crashed, that's why I got no error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window