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

So easy I feel stupid asking...Subtotals in a Query

Status
Not open for further replies.

crystalfun

Programmer
Feb 8, 2001
39
0
0
US
Table Name: tbl project
Field Names:
Co
Dept
Acct
Project
Balance

This table is sorted ascending by Project #. I want to create a query showing Co, Dept, Acct, Project, & Balance. Then at each change in PROJECT I want to subtotal the amount of BALANCE so that I see the individual amounts and then a subtotal line much you can do in Excel. How can this be done?

 
Create a query and paste this into it:

Table Name: tbl project
Field Names:
Co
Dept
Acct
Project
Balance

select Co
,Dept
,Acct
,Project
,sum([balance]) as bal_sum
from [tbl project]
group by Co
,Dept
,Acct
,Project

 
Thanks for the SELECT statement. However this does not subtotal at each change in Project. Can Access do this or do I have to stick to Excel?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top