I had a similar problem where I would work on the reports on my machine and they would change the margins. The reason for this was the other machine had a different printer connected ( a DVD printer in fact) So whatever I did to the report on my machine, it would reset the page settings so MY printer could print it. Try editing the page settings on the computer the database it is going to used on.
Ian Mayor (UK) Program Error
There's ALWAYS more than one way to skin a cat!
But only one way to get it RIGHT!
In the report's open event you can use the printer object to set the paper size, margins, etc so that it will be the same on each machine that is using the app. For example,
Keep in mind that one twip = 1/1440 of an inch so in the above example my margins have been set to half an inch. There are other settings you can change too such as the paper tray, portrait or landscape, manual feed, etc. Have a look at the "Printer" object.
I spent like 2 days trying to figure this one out, because I have some canned reports that users will have access to and because I opened up the printers to them it also gave them access to the page setup, your code should guarantee that whatever margins they set, will simply get reset upon opening.
By any chance do you know the code to keep the paper "portrait"?
The title of this thread "Setting Page Margins of Access 2000 Report in VBA" relates to Access 2000. When I try to use the printer object methods stated by T Man, I get a "Method or Data member not found" error.
Hi All- I am having the same trouble as IronBeaver. The Printer object does not exist for me. Is this a reference I need to turn on? I really need to get this to work. Anyone have any ideas? Thanks.
If you are using Access2000, there is no printer object available, and as such, the solution posted by TMan will not work. You have 3 options:
1) Upgrade to a newer version of Access.
2) Programmatically set the report settings following the msdn link I provided above.
3) Update your office2000 with service pack 1a ( see
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.