Page Numbers

team lib

Page Numbers

The report wizard automatically puts page numbers onto reports , or you can put them in yourself in design mode (you can simply add them from the Insert menu), but let's add them manually so you can see what these other methods actually do.

Try It Out-Page Numbers

  1. In the page footer add a new textbox. Place it at the right of the page.

  2. Bring up the Properties for the new textbox, select the Data tab and add the following code into the Control Source property:

     = "Page " & [Page] & " of " & [Pages] 
  3. Delete the label for this textbox, as we won't need it.

  4. Switch the report to Preview mode and have a look at the bottom of the page.

    click to expand

How It Works

This is really simple. You know that we use the and symbol (&) to join strings together in expressions. Well, Page and Pages are predefined fields within any report, and identify the current page number and the total number of pages. We enclose them in square brackets to tell Access that these are fields and not strings.

 
team lib


Beginning Access 2002 VBA
Beginning Access 2002 VBA (Programmer to Programmer)
ISBN: 0764544020
EAN: 2147483647
Year: 2003
Pages: 256

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net