Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I put the page number on both sides of a book-type landscape report

How To

How do I put the page number on both sides of a book-type landscape report

by  jimmythegeek  Posted    (Edited  )
You may need to create a report that prints landscape like a book. You want the left side of the page to say page 1, and the right side of the page to say 2. This is actually pretty simple. There are only 2 steps.

1) Put an unbound text box on each side of the report's page footer. Put the following in the control source of both text boxes:

=GetPageNo()

2) Copy and paste the following function into the code of the report. (If you are unfamiliar with how to do this, while in design veiw, go to View | Code on the menu bar, and paste the code a couple of lines below the Option Explicit).

=======================================
Private Function GetPageNo() As Integer
Static staPageNo As Integer

If staPageNo > 0 Then
staPageNo = staPageNo + 1
GetPageNo = staPageNo
Else
GetPageNo = 1
staPageNo = 1
End If
End Function
=======================================

Jim Lunde
jimlunde@gmail.com
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top