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

Total SUM of SumOf in Access query

Status
Not open for further replies.

EMax1

MIS
Apr 8, 2004
95
US

My query is as follows:


SELECT ALLVAN.VENDNB, Sum(ALLVAN.SALYTD) AS SumOfSALYTD, Sum(ALLVAN.SALLYTD) AS SumOfSALLYTD, ALLVAN.PRDNB
FROM ALLVAN
GROUP BY ALLVAN.VENDNB, ALLVAN.PRDNB
ORDER BY ALLVAN.VENDNB, Sum(ALLVAN.SALYTD) DESC;

this is fine, but I would like to be able to calculate the sum of the SumofSALLYTD to have the total of all the SumOfAllytd generated by this query.
Is-it possible or do I need to do it with an external program?

Help would be appreciated on that oine.
Thanks in advance
 
Create a new query and use this query as the source (if you are using the query design grid, when you first create the query you can choose tables or queries as the source).

HTH

Leslie
 
Actually What I am looking is a query that could generate something like thgis

VendNB SumOfSALLYTD TotalAllSum
111 1 1
222 3 4
333 2 6

the field TotalAllSum beeing calculated at each row

 
you mean you want a cumulative total. Search around this forum and the other access forums, there are several threads on cumulative totals.

HTH

leslie


Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top