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  

Page Number on a Report



 
 
Thread Tools Display Modes
  #1  
Old May 10th, 2007, 08:44 PM posted to microsoft.public.access.reports
Lamar
external usenet poster
 
Posts: 60
Default 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  
Old May 10th, 2007, 08:59 PM posted to microsoft.public.access.reports
Eric Blitzer
external usenet poster
 
Posts: 209
Default 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  
Old May 11th, 2007, 12:55 AM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 2,364
Default 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

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


All times are GMT +1. The time now is 08:31 PM.


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