Bonnie,
That's what I thought. So now I'm confused. You have said elsewhere in
this thread that the concept you have been working with "works great",
whereas this only relates to starting times, and I would expect it to
give incorrect results. To get an accurate readout of who is "at work",
you will need a quite different concept. For the record, this is how I
would have approached it...
SELECT YourTable.DateOfWork, Format([DateOfWork],"dddd") AS DayOfWork,
-Sum([StartTime]<#08:30#) AS [Before 0830], -Sum(([StartTime] Between
#08:30# And #13:30#) Or ([EndTime] Between #08:30# And #13:30#) Or
([StartTime]<#08:30# And [EndTime]>#13:30#)) AS [0830 to 1330],
-Sum([EndTime]>#13:30#) AS [After 1330]
FROM YourTable
GROUP BY YourTable.DateOfWork, Format([DateOfWork],"dddd"),
Weekday([DateOfWork])
ORDER BY Weekday([DateOfWork])
--
Steve Schapel, Microsoft Access MVP
Hi Steve,
I don't think I have quite figured out what being "at work" means yet.
Sometimes it means someone is holding up a wall or keeping a seat warm. But
for my programming purposes here it means that they clocked in at one time
and clocked out by another so if they hadn't clocked out yet we will consider
them at work.
Thanks.