Access 2000 db で次のクエリを実行しようとしていますが、常に Diff フィールドに #ERROR が表示されます。修正するのを手伝ってください。
PARAMETERS [Enter Date] DateTime;
SELECT sub.Emp_ID, sub.Name, Dept, sub.Day, sub.Attending, sub.Leaving, sub.Leaving - sub.Attending AS Diff
FROM [SELECT
M.EmpID AS Emp_ID,M.Name,M.Dept,
IIf (IsNull(H.EventDate), "NP", H.EventDate) AS [Day],
MIN(H.EventTime) AS Attending,
MAX(H.EventTime) AS Leaving
FROM
Member AS M
LEFT JOIN History AS H
ON
(M.UserID = H.EventUserID
AND Format([EventDate], "dd/mm/yyyy") = [Enter Date])
WHERE
M.EmpID NOT IN (select EmpID from exceptionList)
GROUP BY
M.EmpID, M.Name, M.Department,EventDate
]. AS sub
ORDER BY sub.Emp_ID;