Hi John,
I acutally have both of those tables in my DB. It might be easier to use the
table with the workdays, correct? How would I include that into my query?
Here's what my query looks like right now.
SELECT qryAttendanceDetails.EmployeeID, qryAttendanceDetails.DateAbsent,
[LastName] & ", " & [FirstName] AS EmpName, tblEmployees.ID,
tblDepartment.Department, tblEmployees.Dept, DeptFilter([Dept]) AS Result,
tblEmployees.Status, qryAttendanceDetails.Type, qryAttendanceDetails.TimeInOut
FROM tblDepartment INNER JOIN (tblEmployees INNER JOIN qryAttendanceDetails
ON tblEmployees.ID = qryAttendanceDetails.EmployeeID) ON tblDepartment.DeptID
= tblEmployees.Dept
GROUP BY qryAttendanceDetails.EmployeeID, qryAttendanceDetails.DateAbsent,
[LastName] & ", " & [FirstName], tblEmployees.ID, tblDepartment.Department,
tblEmployees.Dept, tblEmployees.Status, qryAttendanceDetails.Type,
qryAttendanceDetails.TimeInOut
HAVING
(((qryAttendanceDetails.DateAbsent)=IIf(Weekday(Date()-1)=1,Date()-3,Date()-1))
AND ((DeptFilter([Dept]))=[Forms]![frmHidden1]![txtDept]) AND
((tblEmployees.Status)="Active")) OR
(((qryAttendanceDetails.DateAbsent)=IIf(Weekday(Date()-1)=7,Date()-2,Date()-1))
AND ((DeptFilter([Dept]))=[Forms]![frmHidden1]![txtDept]) AND
((tblEmployees.Status)="Active")) OR
(((qryAttendanceDetails.DateAbsent)=IIf(Weekday(Date()-1)=6,Date()-1,Date()-1))
AND ((DeptFilter([Dept]))=[Forms]![frmHidden1]![txtDept]) AND
((tblEmployees.Status)="Active"));
Thanks
SS