H
hotrod1952 via AccessMonster.com
SQL is:
SELECT WO.WOID, WOLabor.WOLaborDate, WO.DateRequired, EMPLOYEE.Name
FROM (WO INNER JOIN WOLabor ON WO.WONo = WOLabor.WONo) INNER JOIN EMPLOYEE ON
WO.AssignedToEmployee = EMPLOYEE.ID
GROUP BY WO.WOID, WOLabor.WOLaborDate, WO.DateRequired, EMPLOYEE.Name, WO.
DateCreated
HAVING (((WO.WOID) Like "PM*") AND ((WO.DateCreated)>=[START DATE dd/mm/yy]
And (WO.DateCreated)<DateAdd("d",1,[END DATE dd/mm/yy])) AND (([WOLabor]!
[WOLaborDate])>[WO]![DateRequired]))
ORDER BY WO.WOID, WO.DateCreated;
I have duplicate WOLaborDate entries in my table so my query returns the
duplicates. I want only the last enrty for each WO.WOID.
SELECT WO.WOID, WOLabor.WOLaborDate, WO.DateRequired, EMPLOYEE.Name
FROM (WO INNER JOIN WOLabor ON WO.WONo = WOLabor.WONo) INNER JOIN EMPLOYEE ON
WO.AssignedToEmployee = EMPLOYEE.ID
GROUP BY WO.WOID, WOLabor.WOLaborDate, WO.DateRequired, EMPLOYEE.Name, WO.
DateCreated
HAVING (((WO.WOID) Like "PM*") AND ((WO.DateCreated)>=[START DATE dd/mm/yy]
And (WO.DateCreated)<DateAdd("d",1,[END DATE dd/mm/yy])) AND (([WOLabor]!
[WOLaborDate])>[WO]![DateRequired]))
ORDER BY WO.WOID, WO.DateCreated;
I have duplicate WOLaborDate entries in my table so my query returns the
duplicates. I want only the last enrty for each WO.WOID.