I asked this question in another post. This code is working in my 2003
version but not the 2007. Both versions I'm getting the wrong page counts.
[quoted text clipped - 8 lines]
"Not working" is a singularly clue free statement. I
haven't played with A2007 enough to know the nuances of this
problem so I will only try to address the A2003 side of it.
First, when you use a text box with Pages, it causes Access
to process the report two times. The first time, it tries
to figure out how many pages are in the report so Pages can
have a value the next time through. Because the value of
Pages is not known the first time through, its value is 0
(zero). This means that your code always makes the page
footer invisible during the first pass (even on the "last"
page). When the page number gets to the calculated value of
Pages during the second pass, then the page footer will be
made visible. But the page footer being visible may(?) push
other stuff on the last(?) page to another page making a
mess of things.
I think you would be way better off if you could find some
other way of making the page footer visible on the last
page. Perhaps making it visible in the report footer
section or the last detail can get what you want.
Note that in some(?) versions of Access, the space for the
page footer can be made available for details,etc. only if
the page footer is made invisible in the page header
section. If the page footer was invisible while the details
were processed and there may not be space for it when the
footer suddenly becomes visible (resulting in something
rather odd).