Page number problem

  • Thread starter Thread starter Denise
  • Start date Start date
D

Denise

I have recently set up a report where I need the page footer to print on the
first page only. I found the answer here which was to add the following
format event procedure.

Me.Section(4).Visible = Me.[Page] = 1

That works great but now it will not let me print page numbers in the page
header. It is either one or the other. Any help would be appreciated.
 
Denise said:
I have recently set up a report where I need the page footer to print
on the
first page only. I found the answer here which was to add the
following
format event procedure.

Me.Section(4).Visible = Me.[Page] = 1

That works great but now it will not let me print page numbers in the
page
header. It is either one or the other. Any help would be
appreciated.


I tried this and it works for me. Are you sure you didn't duplicate the
code you used to suppress the page footer in the page header event?

I used the following 3 lines in the indicated events and it printed a
page number in the header for every page, and in the footer for page 1
only.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Me.Section(4).Visible = Me.[Page] = 1

End Sub

Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)

txtFooter = Me.Page

End Sub

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)

txtHeader = Me.Page

End Sub


--
 
Denise said:
I have recently set up a report where I need the page footer to print on the
first page only. I found the answer here which was to add the following
format event procedure.

Me.Section(4).Visible = Me.[Page] = 1

That works great but now it will not let me print page numbers in the page
header. It is either one or the other. Any help would be appreciated.


That should work. You probably have something somewhere
else that's messing with the page header.

Note: If you want to use the page footer's space for detail
data, then put your line of code in the page **header**
section's Format event.
 
Back
Top