?
Solved

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

Posted on 2001-09-04
3
Medium Priority
?
224 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
[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
3 Comments
 
LVL 58

Accepted Solution

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

Jim.
0
 
LVL 58
ID: 6454448
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
ID: 6454985
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

771 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