Solved

Show/Hide page numbers in a report's Group section

Posted on 2001-09-04
3
218 Views
Last Modified: 2012-06-21
Background:  I have an Access 97 report that generates invoices for mailing.  A single report consists of several invoices that print as a single report.  Most invoices are only 1 page long, but the level of detail or formatting rules can result in more than one page for that individual invoice within the report.  There is no way of knowing ahead of time how many pages a given invoice will be.

I have page numbers showing on the bottom of each page.  By resetting .page = 1 in the GroupHeader_Format sub of the report I can correctly show the page numbers for all invoices in the report.  However, my client only wants page numbers to show when the individual invoice is more than one page.  The Pages property only keeps track of the total pages of the entire report.

Question:  Is there a way of knowing how many pages are in a single Group section of the report (a particular invoice) to use that number to test whether to hide or show the control displaying the page number for that Group section?  Seems to be a limitation in Access to have a forward look at that level of detail (anything less than the entire report).
0
Comment
Question by:garyw1
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 50 total points
Comment Utility
You can use the WillContinue property to see if a page will continue or not.

Jim.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
Also, here is a MSKB article that show you how to do "page x of y" over a group.

http://support.microsoft.com/support/kb/articles/Q131/9/37.asp

Jim.
0
 

Author Comment

by:garyw1
Comment Utility
Your suggestion looked to solve the problem, and it did for about 1/2 of the group sorts (invoices), but the other half didn't display correctly due to the way my repetitive detail section prints.  Also had problems finding enough documentation on WillContinue to know if there was any other syntax or a different section to use as the trigger.

The solution I have implemented uses a boolean variable to flag whether the last section of the invoice has printed - it will always only print on the last page.  The page footer checks this flag and shows visible when required.

Your suggestion, while not the solution I used, helped get me to the right support information to come up with the solution.  Thanks.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

728 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

14 Experts available now in Live!

Get 1:1 Help Now