Hi all,
I wrote this query to show how many records had been completed by individual people in certain time frames but I'm having trouble adding a where clause,
The query runs fine without any where clause but if I try to add "WHERE DateCompleted = #01/06/2016#" or anything along those lines it always returns no results.
I've attached the query below, any help would be appreciated.
Thanks
I wrote this query to show how many records had been completed by individual people in certain time frames but I'm having trouble adding a where clause,
The query runs fine without any where clause but if I try to add "WHERE DateCompleted = #01/06/2016#" or anything along those lines it always returns no results.
I've attached the query below, any help would be appreciated.
Thanks
Code:
SELECT StaffLog.Name, StaffLog.LogIn, StaffLog.LogOut, Sum(IIf([DateCompleted]>=[LogIn] And ([DateCompleted]<=[LogOut]),1,0))
FROM StaffLog LEFT JOIN Items ON StaffLog.Name = Items.Name
GROUP BY StaffLog.Name, StaffLog.LogIn, StaffLog.LogOut