zephyrtear
New member
- Local time
- Today, 13:11
- Joined
- Jul 19, 2010
- Messages
- 2
Is it possible to sum all records that have the same values in 2 columns?
Hello!
Im having a bit of trouble with a database i am making for my farm and need help figuring out how to sum multiple records that share a same constant. Let me try to explain better...
I have the following tables and queries with the following columns:
Table 1 - JobsDone
JobID | Date | ActivityID | AreaID
Table 2 - JobsDetailed
JobID | WorkerID | BegTime | EndTime
Table 3 - Workers
WorkerID | Name | Wage
Query 1 - (with Example data)
Name | Date | BegTime | EndTime | ActivityID | Hrsworked
Joe | Jul -10 | 8:00 | 9:30 | 1 | =[Endtime]-[Begtime]
Joe | Jul -10 | 12:30 | 15:30 | 4 | =[Endtime]-[Begtime]
Joe | Jul -11 | 16:00 | 18:30 | 3 | =[Endtime]-[Begtime]
Eric | Jul 12 | 8:00 | 9:00 | 1 | =[Endtime]-[Begtime]
I need to have a daily sum of all the hours of each worker in order to find out if any of them worked overtime or not. Is there a way where this can be done automatically directly in a report? I dont want to have to make a query for each worker for each day to pull this information.
I used to have it done in excel by manually inputting the time each person began and ended their workday. But now that im trying to make a well planned db in access im having trouble with the automation of this process.
Any help is very much appreciated! Thank you!!
Hello!
Im having a bit of trouble with a database i am making for my farm and need help figuring out how to sum multiple records that share a same constant. Let me try to explain better...
I have the following tables and queries with the following columns:
Table 1 - JobsDone
JobID | Date | ActivityID | AreaID
Table 2 - JobsDetailed
JobID | WorkerID | BegTime | EndTime
Table 3 - Workers
WorkerID | Name | Wage
Query 1 - (with Example data)
Name | Date | BegTime | EndTime | ActivityID | Hrsworked
Joe | Jul -10 | 8:00 | 9:30 | 1 | =[Endtime]-[Begtime]
Joe | Jul -10 | 12:30 | 15:30 | 4 | =[Endtime]-[Begtime]
Joe | Jul -11 | 16:00 | 18:30 | 3 | =[Endtime]-[Begtime]
Eric | Jul 12 | 8:00 | 9:00 | 1 | =[Endtime]-[Begtime]
I need to have a daily sum of all the hours of each worker in order to find out if any of them worked overtime or not. Is there a way where this can be done automatically directly in a report? I dont want to have to make a query for each worker for each day to pull this information.
I used to have it done in excel by manually inputting the time each person began and ended their workday. But now that im trying to make a well planned db in access im having trouble with the automation of this process.
Any help is very much appreciated! Thank you!!
Last edited: