Hello all,
I have the following query where ID is an Autonumber:
Code:
SELECT Last(tblActingTMP.ID) AS LastOfID, tblActingTMP.EmpName, tblActingTMP.SubstantiveCC, tblActingTMP.SubstantivePN, tblActingTMP.ActingForName, tblActingTMP.PositionNumber, tblActingTMP.ActingCC, tblActingTMP.StartDate, tblActingTMP.EndDate, tblActingTMP.Excluded
FROM tblActingTMP
GROUP BY tblActingTMP.EmpName, tblActingTMP.SubstantiveCC, tblActingTMP.SubstantivePN, tblActingTMP.ActingForName, tblActingTMP.PositionNumber, tblActingTMP.ActingCC, tblActingTMP.StartDate, tblActingTMP.EndDate, tblActingTMP.Excluded;
The query should only return the last record if I'm not mistake, but it is returning all records in the table. What am I doing wrong here? I've also tried MAX.
Thanks,
Scott