balance forwarded totals

R

rogeliomarigomen

i created a report that prints page totals and balance forwarded totals that
prints the page total of the previous page in the first line of the second
and succeeding page. This works when i print all pages of the report from
page 1 up to the last page. However, when i print only one page the totals
are all wrong. Any suggestions/comments?
 
A

Allen Browne

If you use the events of the report sections to accumulate a total across
pages, the results will be unreliable (as you found.)

Instead, use a Running Sum (hidden) text box to accumulate the totals.
 
R

rogeliomarigomen via AccessMonster.com

hi allen, thanks a lot for the reply. i am quite new to access programming
and i will appreciate it very much if you can eleborate more on how to use
running sum text box to print page totals and balance forwarded in each page
 
A

Allen Browne

This example assumes you have a Currency field named Amount to show balances
for.

1. Add a text box to the Detail section, and give it properties:
Control Source Amount
Running Sum Over All
Name txtAmountRS
Visible No

2. Add an unbound text box to the Page Header. Properties:
Name txtAmountPageHead
Format Currency

3. Add a text box to the Page Footer section. Properties:
Control Source =[txtAmountRS]
Name txtAmountPageFoot
Format Currency

4. Select the Page Footer section.
On the Event tab of the properties box, set:
On Format [Event Procedure]
Click the Build button beside this (...) and enter this line between the
"Private Sub..." and "End Sub" lines:
Me.txtAmountPageHead = Me.txtAmountPageFoot

If you use A2007, it will work in Preview or Normal, unless the report is
complex.
(Layout and Report view don't have page totals.)
 
R

rogeliomarigomen via AccessMonster.com

hi allen,

EUREKA ! it works! you solved my problem. thank you very much!

Allen said:
This example assumes you have a Currency field named Amount to show balances
for.

1. Add a text box to the Detail section, and give it properties:
Control Source Amount
Running Sum Over All
Name txtAmountRS
Visible No

2. Add an unbound text box to the Page Header. Properties:
Name txtAmountPageHead
Format Currency

3. Add a text box to the Page Footer section. Properties:
Control Source =[txtAmountRS]
Name txtAmountPageFoot
Format Currency

4. Select the Page Footer section.
On the Event tab of the properties box, set:
On Format [Event Procedure]
Click the Build button beside this (...) and enter this line between the
"Private Sub..." and "End Sub" lines:
Me.txtAmountPageHead = Me.txtAmountPageFoot

If you use A2007, it will work in Preview or Normal, unless the report is
complex.
(Layout and Report view don't have page totals.)
hi allen, thanks a lot for the reply. i am quite new to access programming
and i will appreciate it very much if you can eleborate more on how to use
[quoted text clipped - 15 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top