Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting detail Page Numbers in multi-record report

Status
Not open for further replies.

Susanhopes

Technical User
Jun 27, 2005
17
US
I'm working on a transcript format that will be run for an entire class all at once. The query-based report contains:
1. A Page Header with school contact info
2. A detail record with the student's personal info and a subform that contains the class information
3. A page footer that contains the pagination field (standard format, below).

="Page " & [Page] & " of " & [Pages]

What I want is for each transcript to reflect the number of pages in *That Transcript Only* so a reader knows if all pages are present. What I'm getting is a reference to the number of pages in the entire run of all records, which makes no sense when each document is viewed individually.

Apart from asking my user to run them one at a time (what a drag) where should I place this page field, and should it be coded differently? Have noodled with different footers and no success. TIA,

Susan
 
Thanks, Duane. I have a follow-up question for you. I'm not a programmer, and am unsure where to place this code and how to get there. Sometimes I will carefully drop a piece of borrowed code into VB if I have clear instructions. (Thank goodness for long-ago Basic and Paschal classes so I'm not scared of it!) Could you please tell me in which part of the report this should go to be effective?

Sorry to be so remedial. Most of what I do can be accomplished using the visual tools and good logic. Wonder why Microsoft didn't think of this pagination option? Seems as though it should be a common request.

I really appreciate your help with this, Duane. You've inspired me to crack the VB section of my help books.

Susan
 
Dwayne, I did run into some difficult with that code. Figured out where I think it goes, believe I've substituted the proper field name in the proper way. Here's what I get:

IN YELLOW TYPE: Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer) END YELLOW TYPE
Dim i As Integer
If Me.Pages = 0 Then
ReDim Preserve GrpArrayPage(Me.Page + 1)
ReDim Preserve GrpArrayPages(Me.Page + 1)
IN RED TYPE: GrpNameCurrent = Me!Foundation ID

Foundation ID is the field name, I'm unclear about all the "Me" references. Does that mean I need to put in the table name to which I'm referring in each instance? Am building from a query. Please help clarify. Thanks tons!

Susan
 
Me" is a reference to the current form or report where the code is running. In this case, Me. refers to:
Reports("YourReportName")
"Me" is an abbreviation or shorthand.

It seems you (or someone else) thinks it's ok to have spaces in field or object names :-(. You may need to change your code to compensate for this:
GrpNameCurrent = Me![Foundation ID]
[Foundation ID] must be a bound field/control in your report.

Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top