ACC1x: How to Print Book Style Page Numbers

ID: Q109821


The information in this article applies to:


SUMMARY

Microsoft Access does not have a built-in format to print page numbers on a report in "bookstyle" format, where odd page numbers are printed on the right side of the page and even page numbers are printed on the left side of the page. This article describes how to print a report with bookstyle page numbering.


MORE INFORMATION

The following example demonstrates how to set up bookstyle page numbering for a report:

  1. Open the sample database NWIND.MDB.


  2. Create the following new macro, and then save it as Page Setting:
    
           Condition                Action
           ---------------------------------
           [PageRight] Mod 2 <> 0   SetValue
            ...                     SetValue
           [PageRight] Mod 2 = 0    SetValue
           ...                      SetValue
    
           Page Setting Actions
           ----------------------------
           SetValue
              Item: [PageRight].Visible
              Expression: Yes
           SetValue
              Item: [PageLeft].Visible
              Expression: No
           SetValue
              Item: [PageRight].Visible
              Expression: No
           SetValue
              Item: [PageLeft].Visible
              Expression: Yes 


  3. Open the List Of Products By Category report in Design view.


  4. Select the Page text box in the report's page footer section.


  5. Change the Page text box's ControlName property from Page to PageRight.


  6. From the Edit menu, choose Copy. Then, from the Edit menu, choose Paste. A copy of the PageRight text box will appear.


  7. Drag the new text box to the left side of the page footer.


  8. Change the new text box's ControlName property to PageLeft.


  9. Select the page footer section of the report, and change its OnFormat property to the macro Page Setting.


  10. Save the report and then preview it.



REFERENCES

Microsoft Access "User's Guide," version 1.0, Chapter 11, "Using Expressions in Forms," page 292, version 1.1, page 296

Microsoft Access "User's Guide," version 1.0, Chapter 20, "Using Expressions in Reports," pages 483-484, version 1.1, pages 487-488

Microsoft Access "Language Reference," version 1.0, "Page Property," page 364

Additional query words: page alternate bookstyle


Keywords          : kbusage RptLayou 
Version           : 1.0 1.1
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: April 2, 1999