Display page footer on page 1 only

wchelly

Registered User.
Local time
Today, 09:22
Joined
Mar 1, 2010
Messages
146
I want to hid the page footer on all but page one. Here is my code, but it doesn't appear to work in print preview...

Private Sub Report_Page()
If Me.Page = 1 Then
Me.PageFooterSection.Visible = True
Else
Me.PageFooterSection.Visible = False
End If
End Sub
 
I just used this and it removed the footer alltogether, and now I can't find where this code is stored. :confused:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
Me.PageFooterSection.Visible = (me.[page]=1)
End Sub
 
This works, but only on Print preview. When I actually print it, it doesn't display. :(
 
I found this recommendation in another post and it does what it says it will do....it prints the footer on only the last page. Any suggestions on how to adapt this so that it will print Only the First page?


"so first set the pagefooter to visible = no , in the property tab

then this does the trick (i did it in the page header format section - i tried various things but it didnt work in the page footer itself)"



Code:
'put this in the page HEADER format If [Pages] > 0 Then PageFooterSection.Visible = ([Page] = [Pages] ) End If
 
Try the following code, but be aware of, if you view it in Preview, you can't send it to the printer afterwards, then you have to close the report and send it directly to the printer.
Be also aware of, the page numbering formatted, as "page of pages" will not be correct.
Code:
Private Sub Report_Page()
If [Page] = 0 Then
  PageFooterSection.Visible = True 
Else
  PageFooterSection.Visible = False 
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom