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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
"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
|
|||
|
|||
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 | |
|
|
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 |