Running Sum 
Author Message
 Running Sum

Can anyone help me please.
I am trying to calculate a running sum in a table or a query on all the
records, and see the result in a datasheet format, like this:

Field1    RunningSum
100            100
200            300
100            400
50               450
.
.
.

I could do that very easly in a report, but I failed to do it in a query or
a form. I've tried to do some coding but I got lost :(.

Any suggestions please

Thanks in advance.



Sat, 15 Sep 2001 03:00:00 GMT  
 Running Sum
Hi,

The easiest way is maybe:

    DSum("FieldToCumul", "TableName", "ID<=" & CurrentID)

assuming ID is the field defining an order about what is a previous record.

Hope it may help,
Vanderghast, Access MVP.

Quote:

>Can anyone help me please.
>I am trying to calculate a running sum in a table or a query on all the
>records, and see the result in a datasheet format, like this:

>Field1    RunningSum
>100            100
>200            300
>100            400
>50               450
>.
>.
>.

>I could do that very easly in a report, but I failed to do it in a query or
>a form. I've tried to do some coding but I got lost :(.

>Any suggestions please

>Thanks in advance.



Sat, 15 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to do a Running Sum with Only Negatives

2. Running sums on a FORM??

3. Running sum

4. Running sum question again

5. Running Sums in Forms

6. How to Count with Running Sum

7. Running Sums with queries

8. Creating a running sum query

9. running sum

10. Help!, running sum on form!

11. Article: How to create a running sum on a form

12. How to do Running Sum in a Query

 

 
Powered by phpBB® Forum Software