Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 9th, 2005, 03:48 PM
Authorized User
 
Join Date: Oct 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page Marings on Reports

Does anyone know how to change the margins on a report via VBA??

 
Old November 10th, 2005, 09:18 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Do a search in your VBA for "PrtMip Property"

This article will show you how to programatically set margins using twips (1440 per inch)



mmcdonal
 
Old November 10th, 2005, 10:04 AM
Authorized User
 
Join Date: Oct 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've tried that and cannot get it to work unfortunately.

 
Old November 11th, 2005, 06:30 AM
Authorized User
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

May I ask why you need to play around with the Margins on the report?

Is there perhaps a simpler way, like multiple reports, or using the CanShrink property with subreports, that are bound/unbound?


Database Agreements
 
Old November 11th, 2005, 09:41 AM
Authorized User
 
Join Date: Oct 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, you may ask. I have a report that is just too big to fit on a standard landscape orientation. So by exanding the margins it will fit. I have tried to set the margins and then save the report in the design view but it does not save the margins.

 
Old November 11th, 2005, 01:50 PM
Authorized User
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, it sounds like you have a problem with the software.
If you change the margins in a report and save it, the margins should stay put.

Do you have Access 2000?
In Access2000, there is a bug fixed in SP1, or SR1 that if you have the AutoChangeFields option on then the landscape reports keep changing to letter reports. So you have to turn it off.



Database Agreements





Similar Threads
Thread Thread Starter Forum Replies Last Post
Index page for reports miaminemo BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 January 11th, 2006 09:31 AM
Page Break in Crystal Reports jb253 Crystal Reports 5 April 26th, 2005 08:06 PM
Page Numbers for Reports twsinc Access VBA 4 March 10th, 2004 09:15 PM
Printer friendly reports from JSP page. ngsaran Crystal Reports 0 October 19th, 2003 05:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.