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 March 1st, 2007, 07:43 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default OpenReport ... how to size?

We want to control the size of the form on which reports appear when opened.

DoCmd.OpenReport doesn't seem to be able to pass anything to control how it's opened and we can't see anything in the actual report that's usable. Was expeecting to be able to use something as simple as me.width=....

Any ideas?

Regards,

Sean Anderson
__________________
Regards,

Sean Anderson
 
Old March 1st, 2007, 08:36 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You have to use a Report event. You can't pass these parameters to the report form the OpenReport event on your form. I think you have to size each section using twips (1440 per inch).

The best way to do this, however, is to make the report the size you want it, and while it is still open, set AutoResize to No, and then Save the report, while it is open. This will make the report open to that size unless a user resizes it and saves it.

Did that help?

If you want the report to open in the same position, do the same thing, but set auto center to No.




mmcdonal
 
Old March 2nd, 2007, 06:10 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nice try, but that only works on a FORM and not on a REPORT.

Regards,

Sean Anderson
 
Old March 2nd, 2007, 08:44 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hmmmm, I better tell Microsoft since that was directly from their Access Help file entitled:

Set the size and position of a form or report

Set the default size of a form or report

1. Open a form in Form view or a report in Print Preview.
2. Size the form or report by dragging the borders of the window.
3. Click Save on the toolbar.

You say it is not working then? I think sizing each section of the report, Header, Group Header, Details, Group Footer, etc is the answer then.

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Size of text box depending on size of another box AstridVM BOOK: Access 2003 VBA Programmer's Reference 0 March 7th, 2007 06:24 AM
Chapter 11 OpenReport Erikj BOOK: Access 2003 VBA Programmer's Reference 0 January 3rd, 2006 11:58 AM
ADP OpenReport() ginoitalo Access 8 November 29th, 2004 09:10 PM
OpenReport Action Cancelled errror in Access 2003 JJ Access VBA 1 August 20th, 2004 09:27 AM
HEEELP!!! - strWhere Problem with DoCmd.OpenReport HenryE Access 1 August 4th, 2004 01:07 AM





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