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

Resetting Pages numbers in access

Status
Not open for further replies.

hac2002

Programmer
Jul 5, 2004
3
GB

Hi

Does anyone know of a way of calculating the no of pages for a group in an access report e.g the report could be 10 pages long but contains 5 seperate 2 page invoices that should be numbered 1 of 2, and 2 of 2.

The individual page number is fine, just the "pages" number.

I've tried a number of thing but am now running out of patience!! Pleas help

Hac
 
hac2002
Try this...

In the Group footer put an unbound text box with the control source ="Page " & Page & " of " & Pages

You will find this expression in Common Expressions if you click the elipses (...) at the right of the Control Source if you click on the text box Properties.

See if that does what you want.

Tom
 

Hi Tom,

I already know how to get the total no of pages i.e. =[Pages]. It was how to reset this number for invoice within an invoice run i was trying to calculate. For the example stated above, this is an eample of what I'm trying to achieve

e.g Invoice Access Page of Pages Calc Pages of Pages
1 1 of 10 1 of 2
1 2 of 10 2 of 2
2 3 of 10 1 of 2
2 4 of 10 2 of 2
3 5 of 10 1 of 2
3 6 of 10 2 of 2
4 7 of 10 1 of 2
4 8 of 10 2 of 2
5 9 of 10 1 of 2
5 10 of 10 2 of 2

Regards

Hac

 
Hac
I see. Without my dummying up a database to try and simulate your structure, three possibilies come to mind...

(1.)
In the Group Footer, put an IIf expression, using the Pages expression, that changes when the Invoice # changes.

(2.)
In the OnFormat property for the Group Footer, put an IIf expression, using the Pages expression, that changes when the Invoice # changes.

(3.)
Use an Unbound text box in the Detail section, and make it a running sum OverGroup (for example, let's call it txtSum). Then have a text box in the Group Footer that has an expression something such as ="Page " & Page & " of " & Pages & " for " & [Invoice#][/b}

See if any of these take you anywhere.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top