A family of Microsoft relational database management systems designed for ease of use.
Dear Neil,
That is a long running and clearly business critical process, so losing the bottom of the statement each month is understandably frustrating. Unfortunately, as a forum moderator, I am not able to open your database or run your code to see how the report is being rendered. My role here is limited to general guidance you can apply from your side. From my research, the symptoms strongly suggest that the old Lebans ReportToPDF routine is misreading the report’s page settings under modern Access, rather than the report itself being designed as A3 landscape. Lebans converts an Access Snapshot through older DynaPDF.dll and StrStorage.dll components, and its history includes specific fixes for paper-size, portrait/landscape, and default-printer problems. It was designed for Access 2000-era systems. Access has native PDF output built in, so you can replace the Lebans call with one line.
- Swap in the native export.
DoCmd.OutputTo acOutputReport, "rptStatement", acFormatPDF, "C:\Statements\Smith.pdf", False. See DoCmd.OutputTo method (Access). - Keep your per landlord filtering. Open the report hidden in preview with your WhereCondition first, then export, then close.
OutputToexports the already open report as filtered, so your one to many queries still work:DoCmd.OpenReport "rptStatement", acViewPreview, , "[LandlordID]=" & lngID, acHiddenthen theOutputToline, thenDoCmd.Close acReport, "rptStatement", acSaveNo. - Email it directly if you prefer.
DoCmd.SendObject acSendReport, "rptStatement", acFormatPDF, sTo, , , sSubject, sBodyproduces the PDF and attaches it in one step, which suits your trial run to yourself and then the run to the landlord. - Clear the stale page setup. Your report is probably still carrying printer settings saved against a 1990s printer. Open the report in Design view > Page Setup > Page, select Default Printer, then set A4 and Portrait and save. In code this is
Reports("rptStatement").UseDefaultPrinter = True, which can only be set in Design view. See Work with form and report printer settings and Set print options in Access.
One thing worth checking before you start: go to File > Account > About Access and confirm whether you are on 32 bit or 64 bit. If you are on 64 bit, the Lebans DLLs cannot load at all, which on its own explains why nothing you change in the report makes any difference.
If the native export still crops the page, I recommend that the Global Admin in your organization create a service request with Microsoft Support. A technical support engineer can perform a remote session to investigate the situation, verify the backend configurations, and run any necessary synchronization tools to resolve the problem. If the issue requires further attention, they can escalate it to a specialized team for deeper analysis. For detailed instructions on how to get support, please refer to Get support - Microsoft 365 admin. If you don't know who your IT administrator is, please refer to this article: How do I find my Microsoft 365 admin? - Microsoft Support
For additional assistance, use this link to find the appropriate contact number from your region: Contact Microsoft customer support | Microsoft Support
I hope this information is helpful and provide you with a clear path forward. Should you have any further questions or need additional assistance, please don't hesitate to reach out. I'm always happy to help. Have a wonderful day!
If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.