SELECT Employee, [Date]
FROM YourTable
WHERE Employee in
(SELECT Employee
FROM YourTable
GROUP BY Employee
HAVING Count(*) > 6)
You can do this is two queries.
Create and save a query called MoreThan5
-- Open New query
-- Select your table
-- Drag the employee field to the table twice
-- Select View: Totals from the menu
-- Change the SECOND group by to Count
-- Enter > 5 in the where under Count
Open a new query
-- Select your table and the saved query.
-- drag from employee to employee
-- Select the fields you want to display from your table
-- run the query.
'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
I have a table with two columns. First column is Date. Second column is
Employee. I want a query to return only the employees that have 6 or more
dates (or entries) and their corresponding dates. How do I do this?