One solution is an SQL statement for such a query that might look like:
SELECT PersonName
, Count(AbsentDate) as HalfYearCount
, Count(IIF(AbsentDate>=DateAdd("d",-90,Date()),1,Null) as 90DayCount
, Count(IIF(AbsentDate>=DateAdd("d",-30,Date()),1,Null) as 30DayCount
FROM [YourAbsenceTable}
WHERE AbsentDate Between DateAdd("M",-6,Date()) and Date()
GROUP BY PersonName
HAVING Count(AbsentDate)<=7
, Count(IIF(AbsentDate>=DateAdd("d",-90,Date()),1,Null) >= 4
, Count(IIF(AbsentDate>=DateAdd("d",-30,Date()),1,Null) >= 3
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I manually type in a form I created the persons name and date they were absent.
I want to be able to run a query, based by the date field (If possible),
meeting the criteria below.
Has anyone had 3 absences with the last 30 days, 4 in the last 90, or 7 in
the past 6 months.