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

Cumulative Data query in Access

Status
Not open for further replies.

cogivina

Programmer
Jun 3, 2003
36
US
Hi,
I have this problem and I don't know how to write a query in MS access. I'd like to create the cumulative sales for every following month based on the table below:

Year Mos Sales
2000 1 55
2000 3 78
2000 6 62
2000 10 45
2001 2 36
2001 12 59

----------------------
mos1 = 55
mos2 = sale(mos1) + sale(mos2) = 55+0 = 55
mos3 = mos2 + sale(mos3) = 55+0+78 = 133, ....

The cumulative sale table:

Year Mos Sales
2000 1 55
2000 2 55
2000 3 133
2000 4 133
2000 5 133
2000 6 195
2000 7 195
2000 8 195
2000 9 195
2000 10 257
2000 11 257
2000 12 257
2001 1 0
2001 2 36
2001 3 36
.............
2001 12 95

Thanks in advance.

 



Search on running totals in the MS Access Forums. LOTS of examples and at least one FAQ.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top