supmktg
07-10-2003, 09:22 AM
I have a report that sums by group. Each new group begins on a new page & I have page numbers in the page footer that reset to 1 with each new group. I have the grand total print on a new page (the last page) of the report, and I want to hide the page footer on this last page because it doesn't make sense (it becomes "Page 1" because of reset function).
I tried the code:
If [page]=[pages] then pagefooter.visible = false
but it doesn't work because the last page's [page] is not equal to the report's [pages].
Does anyone have a suggestion?
Thx, Neal
Page Footer Not with Rpt Ftr on the property sheet
supmktg
07-11-2003, 07:43 AM
Rich,
I'm not sure I follow? If you're saying the code needs to be in the page footer section, that's where I put it. The problem is that I have a module function that resets the page to 1 at the beginning of each new group, so the last page number is not the same as the total number of pages:
Option Compare Database
Option Explicit
Function resetpage()
On Error GoTo page_Err
With CodeContextObject
.Page = 1
End With
page_Exit:
Exit Function
page_Err:
MsgBox Error$
Resume page_Exit
End Function
Maybe someone can help me alter this code to include 'set last page =last page'.
If not, I either need to create a variable that calculates each page # without resetting, or have a second set of page numbers for the report vs the group, or or find some other way to determine that this is the last page.
Any ideas?
Thx, Neal
Your "last page" should be the Report Footer, the reports property sheet gives you the option not to print the page footer with the report footer, no code is needed therefore
supmktg
07-11-2003, 02:34 PM
Rich,
Thanks so much, I didn't think to look for such a simple setting in the report's property sheet after struggling with the code for the group page count.
Thx, Neal