Sum of hours today from one type of employee

double2

Registered User.
Local time
Today, 23:22
Joined
Aug 7, 2009
Messages
13
Hi guise :3

I have a database set up to record and report staff absence accross a call centre. I am just putting the finishing touches on it at the moment but I am totally stumped with this bit despite scouring the forums and following tutorials.

I am trying to make a simple query that sums up the number of hours of absence reported for today for people on the phone. My query currently looks like this:

***
Field: Sum Of Number of Hours: Number of Hours
Table: Absence Log
Total: Sum
Show: Yes
***
Field: Telephony
Table: Staff Data
Total: Group By
Show: No
Criteria: -1
***
Field: Date
Table: Absence Log
Total: Group By
Show: No
Criteria: date()
***
Field: Employee ID Number
Table: Absence Log
Total: Group By
Show: No
***

I have this then presented though a subdatasheet on a form just to show the one, total figure for the day (maybe not the best way to do things but I'm freestyling slightly here!).

It worked when I was testing it out but, surprise surprise, it's not working now that I've released it for use! When I look at the query in datasheet format it's presenting multiple rows of data grouped bt the employee id.

Furthermore to add to my worries, it's showing twice the figure for one of the employees (definitely no dupes in the staff data) which makes me fear for the general integrity of the database's core functions!

Any help is greatly appreciated.
 
Can you post a sample of what you have now?
David
 
Can you post a sample of what you have now?
David

Hi, thanks for your response - what exactly do you need as a sample? The output?
 
Hi, thanks for your response - what exactly do you need as a sample? The output?

For the sake of anyone coming accross this thread in future: as it turn out, I did not have a primary key defined in the Staff Data table therefore makining any relationship "indeterminate". Once I managed a one to many relationship it worked fine!
 

Users who are viewing this thread

Back
Top Bottom