SUMMING

G

Guest

Hello programmers. I have a table (see below sample) that has employee check dates and hours. I would like to code or query the sum hours for all the EmpID's by year. (i.e. EmpID:00134, Year:2003, TotalHours:12
EmpID:00127, Year:2003, TotalHours:6
EmpID:00119, Year:2003, TotalHours:85

NOTE: I WILL HAVE MY USERS ENTER THE YEAR VIA A CONTROL. THANKS FOR ANY HELP I WILL BE WORKING ON IT AS WELL.

EmpID CheckDate HOUR
00134 1/7/2001 7
00134 1/15/2001 6
00134 1/20/2002 5
00134 1/30/2002 2
00134 2/3/2003 6
00134 2/14/2003 5

00127 1/7/2001 2
00127 1/25/2001 1
00127 1/20/2002 8
00127 1/28/2002 7
00127 2/3/2003 4
00127 2/15/2003 1

00119 1/7/2001 6
00119 1/13/2001 6
00119 1/20/2002 1
00119 1/28/2002 2
00119 2/3/2003 6
00119 2/15/2003 1
 
L

Les

Hi,
I think you just need to make a query, select empid,
create a new field which is just the year, (Use datepart
function on your checkdate field, and hours.
Click the totals button. Leave group by for empid and
your new field, and change group by to sum for your hours
field.
-----Original Message-----
Hello programmers. I have a table (see below sample)
that has employee check dates and hours. I would like to
code or query the sum hours for all the EmpID's by year.
(i.e. EmpID:00134, Year:2003, TotalHours:120
EmpID:00127, Year:2003, TotalHours:61
EmpID:00119, Year:2003, TotalHours:85)

NOTE: I WILL HAVE MY USERS ENTER THE YEAR VIA A CONTROL.
THANKS FOR ANY HELP I WILL BE WORKING ON IT AS WELL. Z
 

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

Top