Summing a count field?

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];
 
G

gumby

Have the critera in the count field be set to =>3 This should only
return records where 3 or more violations exist.
 

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