Shouldn't that be +1 in each case?Code:=[Page]-1 & " of " & [Pages]-1
Me.PageNumber.Visible = (Me.Page >= 2
IIf(Me.Page >= 2), Me.PageNumber.Visible, False)
You have one ( and two )
try adding code to the format footer or header event (or wherever you have the page count displayed)
Code:If Me.Page = 1 Then Me.PageNumber.Visible = False Else Me.PageNumber.Visible =True End If
Margins are right. If I remove the Page Footer Format event then it works fine. Just looks silly with 1 page saying "Page 1 of 1"are your margins correct? i think you have miss read the original post. this is to hide the page text ie "Page 1 of 2" in the footer, not a complete page from a report.
Start a new thread please.
then use this in the reportMargins are right. If I remove the Page Footer Format event then it works fine. Just looks silly with 1 page saying "Page 1 of 1"
My apologies. I will do so.
=[Page]-1
Thanks very much for everyone's input.I noted something else that was apparently done incorrectly.
You wanted to know if this was going to be a one-page wonder. The test was supposed to be IF Me.Pages > 1 .... but in the code you showed that addressed the issue, you showed IF Me.Page > 1 .... and that is a different thing. For reports, Me.Page is the current page number but Me.Pages is the number of pages in the report as a whole. They CAN be different.
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
Me.PageNumber.Visible = (Me.Pages >= 2)
End Sub