I created several reports that check for the page bottom before possibly printing a group header. This avoids an orphan group header (group header with no detail) at the bottom of a page. The code I used for this came from Microsoft.
Now, one report shows 2 more printed pages than the total pages (ie: 149 of 147 pages) on the last page. The 149 is the true page count, but the 147 is not. Access must lose track of the total page numbers as it's formatting the report. That report seems to have a problem with any page count.
It's a minor thing, but I know my managment will pick at that as if it was a major thing. Other reports using a similar technique work properly.
I don't use a subreport, but the detail for each group can vary. The detail section and its controls can grow/shrink. There is one line per detail so there should not be a gap problem between detail lines. There are some blank records in the query I use as group counters, so allowing the detail section and controls to shrink/grow works well in minimizing white space.
I also added code to make some of the group header controls not visible if a group is continued to the next page. I replace them with a "continued ..." label. The group header and its controls cannot grow/shrink and the page problem remained after I deleted that code as a test.
This report also has a page numbering problem if it's told to render the detail and other controls not visible (summary mode).
Any ideas to find and fix the problem?