Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 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

20 Experts available now in Live!

Get 1:1 Help Now