By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 1,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

Print margins not being honored in reports

P: 3
This database has existed for years. In the past the reports always had 0.25" margins. Recently our president asked for some changes that required 0.00" margins on multiple reports. The full report width was changed to 8.5" to print on letter, and the margins were reduced to 0. All report pages are generated as PDF with "acOutputReport,"",acFormatPDF". This works fine on my computer with the ACCDB or ACCDE file. The database is split frontend and backend. All user have their own frontend (that is copied from the ACCDE file on the server (which is the ACCDE file that works fine for me). When another user prints a report they get the warning that the page width is wider than the page (blah, blah, blah). Any idea why the width/margin is not setup correctly for the co-worker?
Mar 8 '17 #1
Share this Question
Share on Google+
2 Replies


jforbes
Expert 100+
P: 1,107
I haven't spent to much time on this subject, but from what I've seen, Access will save the name of the last printer that the Report was formatted for during Design time. When the Report is Previewed, it will see if the Current Default Printer is the same as the Printer that was saved with the Report. When they don't match, Access will reset certain things to match the Default printer, as best as it can, like the Margins.

You might try adding this to the Report's OnOpen Event, I haven't tried it... It might work:
Expand|Select|Wrap|Line Numbers
  1. Me.Printer.TopMargin = 0
  2. Me.Printer.BottomMargin = 0
  3. Me.Printer.LeftMargin = 0
  4. Me.Printer.RightMargin = 0
Mar 8 '17 #2

P: 3
I tried this approach, and it did not work for me. I did determine that it was the setting for the default printer. I set the "Default Printer" in page setup for the report. When I print the report on my computer, my default printer is a PDF printer (I rarely create a piece of paper). The co-workers print to paper daily, and have their default printers set to actual printers. Their actual printer does not have the capability of using a margin of "0" for any of the margins, so it sets the physical margin at the minimum for the printer...even though the report is create with acFormatPDF.

Unfortunately if I select a printer that the user does not have access to then that causes problems of its own. I do wish that Access could understand that acFormatPDF did not require a printer, and could ignore which printer to look at to determine if the settings would produce a useful report.
Mar 8 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.