You didn't answer my questions about what the fields are meant to show.
Here's an example of what I'm talking about doing it as a query though
Create a query with this SQL statement:
Code:
SELECT EmpClocking.ID, EmpClocking.OtherType, EmpClocking.CIN
FROM EmpClocking
WHERE (((EmpClocking.CIN) Between [enter the start date] And [enter the end date]));
Call this query qryTimeOffSummaryPre
then create this query:
Code:
SELECT qryTimeOffSummaryPre.ID, 10-[daysoff] AS WorkingDays, IIf(Count([OtherType])>10,10,Count([othertype])) AS DaysOff, Max(IIf([othertype]="OFF",[cin],Null)) AS LastOFFDate
FROM qryTimeOffSummaryPre
GROUP BY qryTimeOffSummaryPre.ID;
Call it anything you want.
I assumed your pay periods were 2 week increments because the data you supplied was about a 2 week period.
In the second query it lists the employee number, the number of days they worked (minus 4 days for weekends) the number of days they had off their most recent date that had OFF as the reason
This assumes you have a regular 5 day work week with 2 days off per week. This basic premise can be applied to whatever your situation is though.