Solved

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

Posted on 2014-01-31
5
331 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
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:JimFive
Comment Utility
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 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
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
Comment Utility
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 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
Comment Utility
<<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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now