Sum multiple records in an Access Query

blackbeltrrf

Registered User.
Local time
Today, 16:29
Joined
May 10, 2007
Messages
13
If I had a table and data that I get data from with fields and data like:

Clock No..... HourType1...... HourType2
1111 ................1
1111 ....................................5
1111 ................1
2222 ................1

I need my output in a query to roll up the multiple records by Clock No in one record and sum the HourType1 and HourType2 together. To look like:

Clock No.......... HourTotal
1111 .....................2.5
2222 .....................1


This seems simple but I am struggling with it. Could someone help?

Thank you in advance
 
Re: Sum multiple records in an Accsess Query

Not sure I'd have types in fields like that, but try:

SELECT ClockNo, Sum(HourType1 + HourType2) AS HourTotal
FROM TableName
GROUP BY ClockNo
 
Re: Sum multiple records in an Accsess Query

Come to think of it you may need the Nz() function around each field to allow for Null values.
 

Users who are viewing this thread

Back
Top Bottom