Solved

Microsoft Access 2013 Reports Setting Margins programmatically  via VBA

Posted on 2014-11-26
3
248 Views
Last Modified: 2014-11-26
I need to set a report margins when the reports open. I want it set to 1.75".  I think that I am suppose to use Twips in the code. What is the code for setting the left margin to 1.75" or I think 2520 Twips. Does anyone have code for this? Where do I put this code?
0
Comment
Question by:marlind605
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40466729
See this answer: http://www.experts-exchange.com/Database/MS_Access/Q_26697234.html

You are correct - there are 1440 twips per inch, so 1.75" is 2520 twips.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40466737
try

docmd.openreport "NameOfReport",acviewpreview
with Reports!NameOfReport.printer
    .topmargin=2520
    .bottommargin=2520
    .leftmargin=2520
    .rightmargin=2520
end with
0
 

Author Closing Comment

by:marlind605
ID: 40466802
Thanks for both replies. The first one solved the problem.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question