Page number problem

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.
 
M

Michael J. Strickland

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


--
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top