I'm trying to create a query that compiles a running total of different criteria, but I'm hitting a roadblock by not adding an AND to my DCount function.
What I want the query to do is count every selection of either Present or Leave for each Department without it displaying a total of 2 for Present and 2 for Leave for each department. Running a Totals query without the Department column, I get exactly what I want, but when I add the Department column in, it groups the numbers regardless of department. I don't want to tie the values to the Departments I have listed, because users will be able to add/remove/rename the Departments to their local use.
I've searched all over and can't seem to figure this one out.
Here's the basic setup:
What I want the query to do is count every selection of either Present or Leave for each Department without it displaying a total of 2 for Present and 2 for Leave for each department. Running a Totals query without the Department column, I get exactly what I want, but when I add the Department column in, it groups the numbers regardless of department. I don't want to tie the values to the Departments I have listed, because users will be able to add/remove/rename the Departments to their local use.
I've searched all over and can't seem to figure this one out.
Here's the basic setup:
Department | Present | Leave |
Dept 1 | 1 | |
Dept 2 | 1 | |
Dept 3 | 1 | |
Dept 4 | 1 |