All,
when I run the following code in my query I get the below error, any ideas?
SQL Code
SELECT AttendancebyDate.Date, AttendancebyDate.EmployeeID, AttendancebyDate.Duration, [Time&LaborArchive].OccuranceNeeded, [Time&LaborArchive].OccuranceAcknoledged
FROM ([Time&LaborArchive] INNER JOIN [EmployeeTime&LaborName] ON [Time&LaborArchive].Name = [EmployeeTime&LaborName].IdleName) INNER JOIN AttendancebyDate ON [EmployeeTime&LaborName].EmployeeID = AttendancebyDate.EmployeeID
GROUP BY AttendancebyDate.Date, AttendancebyDate.EmployeeID, AttendancebyDate.Duration, [Time&LaborArchive].OccuranceNeeded, [Time&LaborArchive].OccuranceAcknoledged
HAVING ((([Time&LaborArchive].OccuranceNeeded)=IIf([Duration]>7,True,False)));
Error
You tried to execute a query that does not include the specified expression '[Time&LaborArchive].OccuranceNeeded)=IIf([Duration]>7,True,False' as part of an aggregate function
when I run the following code in my query I get the below error, any ideas?
SQL Code
SELECT AttendancebyDate.Date, AttendancebyDate.EmployeeID, AttendancebyDate.Duration, [Time&LaborArchive].OccuranceNeeded, [Time&LaborArchive].OccuranceAcknoledged
FROM ([Time&LaborArchive] INNER JOIN [EmployeeTime&LaborName] ON [Time&LaborArchive].Name = [EmployeeTime&LaborName].IdleName) INNER JOIN AttendancebyDate ON [EmployeeTime&LaborName].EmployeeID = AttendancebyDate.EmployeeID
GROUP BY AttendancebyDate.Date, AttendancebyDate.EmployeeID, AttendancebyDate.Duration, [Time&LaborArchive].OccuranceNeeded, [Time&LaborArchive].OccuranceAcknoledged
HAVING ((([Time&LaborArchive].OccuranceNeeded)=IIf([Duration]>7,True,False)));
Error
You tried to execute a query that does not include the specified expression '[Time&LaborArchive].OccuranceNeeded)=IIf([Duration]>7,True,False' as part of an aggregate function
Last edited: