Avatar of mltigman
mltigman
 asked on

Accumulated Column Sums in Access

I have attached an example MS Excel Spreadsheet which shows the following:

Column A - Spend has a list of values.  
Column B - Cumlative Spend

So B2 = A2.
B3 = A2+B3

and so on...

I need to do this in Access, and I do not know much about it.  So I need a detailed explaination, any SQL needed, etc.  Thanks.
CaSETest.xlsx
Microsoft Access

Avatar of undefined
Last Comment
Patrick Matthews

8/22/2022 - Mon
Rey Obrero (Capricorn1)

see this link

How to Create a Grouped Running Sum in a Query
http://support.microsoft.com/?kbid=205183

Jeffrey Coachman

ASKER CERTIFIED SOLUTION
Patrick Matthews

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
mltigman

ASKER
Works great.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Patrick Matthews

Glad to help!

Untested, but may work also:

SELECT t1.ID, t1.Spend, Sum(t2.Spend) AS Cumulative
FROM SomeTable t1 INNER JOIN
    SomeTable t2 ON t2.ID <= t1.ID
GROUP BY t1.ID, t1.Spend
ORDER BY t1.ID, t1.Spend

Open in new window