PageFooterSection_Format code doesn't work

  • Thread starter Thread starter george tracey
  • Start date Start date
G

george tracey

I have used the code below to try to avoid having a footer section print
out on a first page and then print out on all succeeding pages.
It works for pages 1, 3 ...... in that the footer doesn't display on
page 1 and does display on pages 3 onwards.

The fail point is that it doesn't work for page 2 which is also not
displayed!

Private Sub PageFooterSection_Format(Cancel As Integer, PrintCount As
Integer)
If Page = 1 Then
PageFooterSection.Visible = False
Else
PageFooterSection.Visible = True
End If
End Sub
 
I have used the code below to try to avoid having a footer section print
out on a first page and then print out on all succeeding pages.
It works for pages 1, 3 ...... in that the footer doesn't display on
page 1 and does display on pages 3 onwards.

The fail point is that it doesn't work for page 2 which is also not
displayed!

Private Sub PageFooterSection_Format(Cancel As Integer, PrintCount As
Integer)
If Page = 1 Then
PageFooterSection.Visible = False
Else
PageFooterSection.Visible = True
End If
End Sub

It's a matter of timing.
Move your code to the Page Header Format event.
You can shorten your code to:
Me.Section(4).Visible = Not Me.Page = 1

Or...
If you also have a Report Header, you can set the Report's Page Footer
property to Not with RptHdr.
It's located on the Report property sheet's Format tab.
 
Back
Top