Access 2010
Access 2003
Seminars
Tips & Tricks
Access Forum
Course Index Insider Circle
 
Tutorials   News   Tips   Forums   Help   Logon   Order  
 
     
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   

  Access   Excel   Word   Windows   FrontPage   Hardware   Misc

 

Reset Page Numbering

How to Restart Page Numbering in an Access Report

Q: Is it possible to have page numbers restart at 1 in an Access report, depending on some field? For example, if I have a report with an employee section, with details about shifts worked. Each employee section may take up several pages. Can I have the page numbering start at one again every time the employee changes? > Greg B.

A: Yes, it's possible, but it's not easy to do. You think Microsoft would have made a feature like this a little more accessible. You need group levels and a little VBA source code to do it.

First, you'll need to group all of the same employee's records together using a Sorting & Grouping Level. Turn on the Group Header if you don't already see it. You don't need a Group Footer. You don't actually need to put any data in the Group level, but if you want to put the employee's name and info in there, that's fine too.

Now, add your page number textbox to the bottom of the page in the Page Footer section. I cover this in Access 104. You just need an unbound textbox with =Page in the Control Source.

Now, right-click on the FirstName Header section and select Build Event (code builder).

In the VBA section, enter:   Me.Page = 1

Also, make sure you set the "ForceNewPage" property for your Group Header to Before Group.

Now here's what happens... the pages will number themselves normally, but when a FirstName group header hits, the VBA code runs and sets the page numbering to 1. Then the next group section forces a new page, numbers accordingly, until the next section hits and resets the page number.

Again, it works... it's not easy to do... and I think Microsoft should have put a "reset page numbering" option in the properties for grouping levels, but that would make things too easy, and you wouldn't need to keep me around anymore.

:) LoL

Hope this helps.

 

 

You may want to read these articles from the 599CD News:

 

 
Learn
 
Microsoft Access
Microsoft Excel
Microsoft Word
Microsoft Windows
Microsoft PowerPoint
Adobe Photoshop
Visual Basic
Active Server Pages
Online Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
WalkThru Tutorials
Free Upgrades
Insider Circle
Info
 
Latest News
New Releases
User Forums
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Help
 
Live Chat
Customer Support
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Live Chat
General Contact Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Try Us
 
Free Lessons
Online Theater
Mailing List
Course Indexes:   Microsoft Access   Microsoft Excel   Microsoft Word   Microsoft PowerPoint   Visual Basic (VB)   Photoshop   Active Server Pages (ASP)  
Keyword Search Cloud:   What's This?   courses   microsoft access tutorials   vlookup   access   cartesian   excel   dlookup   vba   attendance   access 2007   sql   windows 7   combo box   pivot table   visual basic   test   iif   word   calendar   query   conditional formatting   pivot tables   photoshop   hlookup   access 101   excel 202   excel 2007   student attendance   update query   my account   word 2007   append query   quickbooks   queries   dsum   reports   powerpoint   if   microsoft access   dmax   mail merge   relationships   ms access   access 2010   vb   dcount   subforms   excel 2003   handbooks   html   599cd   combobox   if function   security   microsoft word   after update  
Copyright 2012 by 599CD.com, All Rights Reserved