I was able to find an example code for Access VBA to insert "Page of pages" per group header. Each group is an individual invoice to our client.
Now, I want to add the cover sheet that shows the total invoice amount, and I can do that. But the cover sheet messes up the page number of the very first invoice following the cover sheet.
For example, The first invoice is only one page. So without the coversheet, the page number shows as "page 1 of 1".
But when I add the Report Header, and force the new page "After the selection", the coversheet shows page 1 of 2 and the first invoice shows page 2 of 2.
Is there a way to not have the page number at all on the coversheet, and the following page has the new page 1 numbering?
ctlGrpPages is the control that shows page numbers, and it is placed in the page footer.
Thank you very much in advance.
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![Claim Number]
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
Else
Me!ctlGrpPages.Value = "Page " & GrpArrayPage(Me.Page) & " of " &
GrpArrayPages(Me.Page)
End If
GrpNamePrevious = GrpNameCurrent
End Sub