Solved

Microsoft Access 2013 Reports Setting Margins programmatically  via VBA

Posted on 2014-11-26
3
257 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

732 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