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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can return the number of pages in a report through VB?

Status
Not open for further replies.

Coxylaad

Programmer
Jan 27, 2004
155
GB
As the title says I have a report that is based on a query, I want to somehow return how may pages are in that report in VB.

What I am trying to do in the big picture is automatically collate the report so when I print it out it collates 3 copies of the report to the printer. I think I have the collating bit sorted but I need to determine how many pages exist in the report?

Any help would be greatfully received.

I have tried opening the report hidden and using the '.pages' property but for some stupid reason it always returns 0.

Help!

Thanks

Ian
 
Have you referenced pages in the report? I seem to remember that .pages will only work in vb if [pages] occurs somewhere in the report.
 
aha!
spot on thanks Remou - that did it!

thanks again

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top