A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need docmd code to display multiple pages of report



 
 
Thread Tools Display Modes
  #1  
Old January 6th, 2005, 08:43 PM
Bartman
external usenet poster
 
Posts: n/a
Default Need docmd code to display multiple pages of report

I am opening a report, maximizing it, and fitting it in the window with the
following code:

DoCmd.OpenReport "rptReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow

This report usually has two pages. Does anyone know of a way to display
both pages? (Another RunCommand perhaps?) Once the report is open, I can
right click, select Multiple Pages (1x2 pages) and it displays them side by
side but I need a way to programmatically display both pages so a can pop up
a msgbox for my users to accept to generate additional code. Thank you for
any advice.

  #2  
Old January 6th, 2005, 11:41 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default

Bartman wrote:

I am opening a report, maximizing it, and fitting it in the window with the
following code:

DoCmd.OpenReport "rptReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow

This report usually has two pages. Does anyone know of a way to display
both pages? (Another RunCommand perhaps?) Once the report is open, I can
right click, select Multiple Pages (1x2 pages) and it displays them side by
side but I need a way to programmatically display both pages so a can pop up
a msgbox for my users to accept to generate additional code. Thank you for
any advice.



DoCmd.RunCommand acCmdPreviewTwoPages

--
Marsh
MVP [MS Access]
  #3  
Old January 7th, 2005, 02:13 PM
Bartman
external usenet poster
 
Posts: n/a
Default

"Marshall Barton" wrote:

Bartman wrote:

I am opening a report, maximizing it, and fitting it in the window with the
following code:

DoCmd.OpenReport "rptReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow

This report usually has two pages. Does anyone know of a way to display
both pages? (Another RunCommand perhaps?) Once the report is open, I can
right click, select Multiple Pages (1x2 pages) and it displays them side by
side but I need a way to programmatically display both pages so a can pop up
a msgbox for my users to accept to generate additional code. Thank you for
any advice.



DoCmd.RunCommand acCmdPreviewTwoPages

--
Marsh
MVP [MS Access]


Thanks Marsh,

Can you advise from an efficiency standpoint the order of these commands:

DoCmd.OpenReport "rptReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdPreviewTwoPages
DoCmd.RunCommand acCmdFitToWindow

I have over 500 reports and I would like to call the last three lines of
code everyime I open a report to reduce the amount of code. I don't know if
it matters but I convert this to mde that is used by hundreds of users so it
is very important that I use the most efficient order in my code. I ran a
timer but I didn't notice any difference but that was in my mdb with just one
user. Thanks.
  #4  
Old January 7th, 2005, 04:49 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default

Bartman wrote:
I am opening a report, maximizing it, and fitting it in the window with the
following code:

DoCmd.OpenReport "rptReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdFitToWindow

This report usually has two pages. Does anyone know of a way to display
both pages? (Another RunCommand perhaps?) Once the report is open, I can
right click, select Multiple Pages (1x2 pages) and it displays them side by
side but I need a way to programmatically display both pages so a can pop up
a msgbox for my users to accept to generate additional code. Thank you for
any advice.


"Marshall Barton" wrote:
DoCmd.RunCommand acCmdPreviewTwoPages


Bartman wrote:
Can you advise from an efficiency standpoint the order of these commands:

DoCmd.OpenReport "rptReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdPreviewTwoPages
DoCmd.RunCommand acCmdFitToWindow

I have over 500 reports and I would like to call the last three lines of
code everyime I open a report to reduce the amount of code. I don't know if
it matters but I convert this to mde that is used by hundreds of users so it
is very important that I use the most efficient order in my code. I ran a
timer but I didn't notice any difference but that was in my mdb with just one
user.



I don't think it matters. This is the way I would do it:
DoCmd.OpenReport "rptReportName", acViewPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdPreviewTwoPages

Note that the TwoPages automatically does the FitToWindow,
so you don't need that line at all.

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Still Hoping for help with a Query problem Don Sealer Using Forms 15 November 13th, 2004 06:24 AM
In an Access Report with multiple pages, how can I send or export. Klf441 Setting Up & Running Reports 1 November 5th, 2004 03:45 PM
Form to generate a Report code Pat Coleman Setting Up & Running Reports 4 July 16th, 2004 12:58 PM
Save Report With CreateReport Coding Issue Jeff Conrad Setting Up & Running Reports 8 July 12th, 2004 08:39 AM


All times are GMT +1. The time now is 11:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.