Solved

Wrong page numbering (Page 32 of 31) in MS Access 2003

Posted on 2014-01-31
5
337 Views
Last Modified: 2014-03-20
I have a report which is generated from MS Access 2003.  It has existed for many years but now the page numbering has started to go wrong showing up as page 32 of 31.  There are no blank pages in the report.

The report is made up of a
Report Header
Page Header
GroupHeader 1 (this section contains a sub-report)
GroupHeader 2
GroupHeader 3 (this section contains a sub-report)
Detail
GroupFooter3
PageFoot (this is where the Page of Pages is located)
ReportFooter


The two sub-reports display images and are resized in code to match the current image.

Can anyone suggest what might be causing this behaviour and how I can fix it.
0
Comment
Question by:Nemetona
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:JimFive
ID: 39824126
Is there any VBA code in any of the Section's Format events?  It looks to me like something is being miscalculated due to a "Retreat".  When the report is getting formatted the format event can run multiple times if it would flow over to a new page.  This causes a Retreat and then a new Format.  If something is Calculating either the current page or the max pages manually this would cause it to be in error.
0
 
LVL 58
ID: 39824150
I was going to ask the same thing; do you have any code that is adjusting the page numbers?

 You can avoid the retreat issue by making sure your checking the format/print count (depends which event your in) with:

 If FormatCount = 1 then
       Me.Page = 1
 End If

Jim.
0
 

Author Comment

by:Nemetona
ID: 39824167
I am using the MS Access in-built [Page] and [Pages] fields to determine the number of pages.

The detail format section in the sub-report within the subreport on the GroupHeader1 section does run 3 times for each page but no calculation of current page or max page takes place.
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39824209
<<The two sub-reports display images and are resized in code to match the current image.>>

 This is the issue....where are you doing the resizing?  Because of this, you may have to handle the page numbering yourself.

Jim.
0
 

Author Closing Comment

by:Nemetona
ID: 39942711
Jim

You were right, the problem lay in the resizing of the pictures, once I sorted that out the page numbering took care of itself.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question