Solved

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

Posted on 2014-01-31
5
336 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 57
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 57

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

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