Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page counter with error in a report

Status
Not open for further replies.

azzu

Programmer
Jul 4, 2001
2
US
I must to correct an error with the page counter in a very complex report, with many subreport inside this report, and some of this subreports have other subreports. The problem is that in the page preview option, you see the report incomplete, at the detail section doesn't show all the registers. And for an example, I see only 7 pages, but when I send to print the report, I obtain 8 pages, and the page counter shows the page "7 of 7", and the page "8 of 7". If I don't choose the preview option, only the print option, the problem is the same.

I think that the printer could be the reason, but when I select the PostScript or the Normal driver, doesn't correct the problem. I need to find the cause of the problem, but if you can help me with a function to calculate the pages in the format PAGE M OF N, I will appreciate it so much!

The three "Access gurus" at my job can't find the reason, and they had said that "it's the most mysterious thing that they have seen"... help me!
 
Oh boy I am having the same problem

My soultion is to create a global variable and have it keep track of the number outside of the report.

here is my function

Global Counter1 '<<<< Put this in the declaration section of the module

Public Function CountEm()
Counter1 = Counter1 + 1
CountEm = Counter1
End Function

Make sure you set Counter1 = 1 before you start.

call the CountEm function in a textbox in your report like so

=CountEm()

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top