Resetting Page Numbers within a report

S

Sarah

I am creating a manifest and want to reset the page number to 1 for each new
customer. I have tried using the 'force new page' property on the last group
footer that I have, but it doesn't seem to work. Any suggestions appreciated.
 
W

Wendy Parry

Hi,
I've just checked this out and I can't get it to work. It doesn't even
seem to run the event. If it actually goes in the footer section
wouldn't it be Private Sub PageFooterSection _format(....)

I've tried it as it is and that doesn't work either...am I missing
something?
 
W

Wendy Parry

I've just got this to work, but had to move a line of code for the
if..then else statement to work with what I had

End If
Me!ctlGrpPages = "Page " & GrpArrayPage(Me.Page) & " of " &
GrpArrayPages(Me.Page)
Else
End If
GrpNamePrevious = GrpNameCurrent
 
W

Wendy Parry

I'm still playing with this one, and I've got a problem with the first
page numbering of a group of pages. Unfortunately it always says Page 1
of 1 when there are multiple pages - the second and subsequent pages are
correct, i.e. page 2 of 2 etc.

Where is this going wrong, the code I now have is the following: PU_SEQ
is the grouping control in the header.

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Dim i As Integer
If Me.Pages = 0 Then
ReDim Preserve GrpArrayPage(Me.Page + 1)
ReDim Preserve GrpArrayPages(Me.Page + 1)
GrpNameCurrent = Me!PU_SEQ
If GrpNameCurrent = GrpNamePrevious Then
GrpArrayPage(Me.Page) = GrpArrayPage(Me.Page - 1) + 1
GrpPages = GrpArrayPage(Me.Page)
For i = Me.Page - ((GrpPages) - 1) To Me.Page
GrpArrayPages(i) = GrpPages
Next i
Else
GrpPage = 1
GrpArrayPage(Me.Page) = GrpPage
GrpArrayPages(Me.Page) = GrpPage
End If
Me!ctlGrpPages = "Page " & GrpArrayPage(Me.Page) & " of " &
GrpArrayPages(Me.Page)
Else
End If
GrpNamePrevious = GrpNameCurrent
End Sub
 
W

Wendy Parry

It's okay, found an earlier thread from FredG - but only through the MS
Community NG website not through standard NG client.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top