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
|
|||
|
|||
Page Number on a Report
Is there a way to calculcate the number of pages on a report without previewing or opening the report first? Is there some back way using VBA? I just need the number of pages, I do not want user to see or have to preview the report to get the number of pages? Thanks for any help. |
#2
|
|||
|
|||
Page Number on a Report
This is directly from the visual basic help files for access. I got it from a previous post. Dim intTotalPages As Integer Dim strMsg As String intTotalPages = Me.Pages strMsg = "This report contains " & intTotalPages & " pages." MsgBox strMsg "Lamar" wrote: Is there a way to calculcate the number of pages on a report without previewing or opening the report first? Is there some back way using VBA? I just need the number of pages, I do not want user to see or have to preview the report to get the number of pages? Thanks for any help. |
#3
|
|||
|
|||
Page Number on a Report
Perhaps.
It depends on whether or not you have can grow or can shrink set on the various sections of the report and what headers and footers etc. you may have. I guess the question is WHY do you need to do this? The number of pages is the number of pages in the report. What behavior are you going to change if the report is 51 pages versus 56 pages? '================================================= === John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County '================================================= === Lamar wrote: Is there a way to calculcate the number of pages on a report without previewing or opening the report first? Is there some back way using VBA? I just need the number of pages, I do not want user to see or have to preview the report to get the number of pages? Thanks for any help. |
Thread Tools | |
Display Modes | |
|
|