A
allie357
Currently I have a query that counts a text field called Policy
I need a query that sums this count field and evaluates it.
Say if the person has 3 violations they would be included in the query.
Any help is appreciated.
Here is the original query with the count:
PARAMETERS [Enter Start Date (mm/dd/yyyy)] DateTime, [Enter End Date
(mm/dd/yyyy)] DateTime;
SELECT tbl_Violations![Violator's Last Name] & ", " &
tbl_Violations![Violator's First Name] AS [Violator's Name],
tbl_Violations.[Policy Violated], Count(tbl_Violations.[Policy
Violated]) AS [CountOfPolicy Violated]
FROM tbl_Violations LEFT JOIN tblDepartments ON
tbl_Violations.[Violator's Department Number] = tblDepartments.[Dept
Number]
WHERE (((tbl_Violations.[Date Entered]) Between [Enter Start Date
(mm/dd/yyyy)] And [Enter End Date (mm/dd/yyyy)]))
GROUP BY tbl_Violations![Violator's Last Name] & ", " &
tbl_Violations![Violator's First Name], tbl_Violations.[Policy
Violated], tbl_Violations.[Violator's Last Name],
tbl_Violations.[Violator's First Name];
I need a query that sums this count field and evaluates it.
Say if the person has 3 violations they would be included in the query.
Any help is appreciated.
Here is the original query with the count:
PARAMETERS [Enter Start Date (mm/dd/yyyy)] DateTime, [Enter End Date
(mm/dd/yyyy)] DateTime;
SELECT tbl_Violations![Violator's Last Name] & ", " &
tbl_Violations![Violator's First Name] AS [Violator's Name],
tbl_Violations.[Policy Violated], Count(tbl_Violations.[Policy
Violated]) AS [CountOfPolicy Violated]
FROM tbl_Violations LEFT JOIN tblDepartments ON
tbl_Violations.[Violator's Department Number] = tblDepartments.[Dept
Number]
WHERE (((tbl_Violations.[Date Entered]) Between [Enter Start Date
(mm/dd/yyyy)] And [Enter End Date (mm/dd/yyyy)]))
GROUP BY tbl_Violations![Violator's Last Name] & ", " &
tbl_Violations![Violator's First Name], tbl_Violations.[Policy
Violated], tbl_Violations.[Violator's Last Name],
tbl_Violations.[Violator's First Name];