Running Sum in reverse order

A

Ann

I hope there is someone out there who can help me. I
apologize if this is a trivial matter, but I in no way
profess to be an Access 2000 expert.

I need to display the running sum of an amount in reverse
order on a report. For example, I have a table similar to
the following:

Section_Heading Amount
1. 50
1.01 200
1.01.1 300
1.01.2 100
2. 100
2.1 200
2.2 100
2.2.01 300
2.2.02 500
2.2.03 1000

I need to calculate a running sum of the amount column
while grouping on the first "level" of the section_heading
and still have the information displayed in ascending
order according to the Section_Heading. In other words,
the following should appear on the report:

Section_Heading Amount
1. 650
1.01 600
1.01.1 400
1.01.2 100
2. 2200
2.1 2100
2.2 1900
2.2.01 1800
2.2.02 1500
2.2.03 1000

Any ideas? Please help!!!

TIA
 
A

Allen Browne

Presumably you have a header nominated in the Sorting And Grouping box for
the major section heading.

If so, you could use a DSum() expression to calculate the total for the
section, and display it in the group header.

Then include a hidden text box in the lower (detail?) section, with its
Running Sum property set to Over Group. The remaining balance is then equal
to the text box in the group header less the running sum text box.
 

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