Query totals - grouped

G

Guest

I have a query that outputs the following data. I would like to have the
query total the "Time" column for records with the same "Time code" and the
same "Date of work".

Rep. # Date of work Tech: Time Code Time

4 Wednesday, January 19, 11048 100160 0.5
12 Thursday, January 20, 11048 100160 0.5
14 Thursday, January 20, 11048 100160 2.5
19 Friday, January 21, 2005 11048 100160 2.5
22 Monday, January 24, 2005 11048 100260 0.5
18 Friday, January 21, 2005 11048 111010 0.5
3 Wednesday, January 19, 11048 121010 0.5
15 Friday, January 21, 2005 11048 134010 0.5
11 Thursday, January 20, 11048 164010 0.5
 
D

Duane Hookom

Try:
SELECT DateOfWork, TimeCode, Sum([Time]) as SumTime
FROM qryNoName
GROUP BY DateOfWork, TimeCode;
 
G

Guest

Thanks a bunch. It works great!

Duane Hookom said:
Try:
SELECT DateOfWork, TimeCode, Sum([Time]) as SumTime
FROM qryNoName
GROUP BY DateOfWork, TimeCode;

--
Duane Hookom
MS Access MVP
--

Bexar1 said:
I have a query that outputs the following data. I would like to have the
query total the "Time" column for records with the same "Time code" and
the
same "Date of work".

Rep. # Date of work Tech: Time Code Time

4 Wednesday, January 19, 11048 100160 0.5
12 Thursday, January 20, 11048 100160 0.5
14 Thursday, January 20, 11048 100160 2.5
19 Friday, January 21, 2005 11048 100160 2.5
22 Monday, January 24, 2005 11048 100260 0.5
18 Friday, January 21, 2005 11048 111010 0.5
3 Wednesday, January 19, 11048 121010 0.5
15 Friday, January 21, 2005 11048 134010 0.5
11 Thursday, January 20, 11048 164010 0.5
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top