I have table tblLate, with columns (EmpID, LateDate, LateHours and LateExcuse)
I need to calculate sum of "LateHours " where "LateDate" is between two dates and no excuse ("LateExcuse" = false), for each employee .
The next snippet of code brings back multiple rows for each emp. Where I assume one row only for each!
Could you give me a code brings one row for each employee with the sum of all his late hours ?
"SELECT tblLate.EmpID, tblLate.LateDate, Sum(tblLate.LateHours) AS Sum¿¿LateHours, tblLate.LateExcuse
GROUP BY tblLate.EmpID, tblLate.LateDate, tblLate.LateExcuse
HAVING (((tblLate.LateDate) Between [Forms]![frmReportsMenu]![
DateFrom] And [Forms]![frmReportsMenu]![
DateTo]) AND ((tblLate.LateExcuse)=Fals
Help me please.