My Table
EmpId StatTime StatCode StatDesc
103002 11/29/00 1:06:50 PM 2 OUT FOR BUSINESS
103002 11/29/00 1:08:34 PM 1 IN
356461 11/28/00 4:06:22 PM 1 IN
356461 11/28/00 4:13:46 PM 4 OUT FOR THE DAY
356461 11/29/00 12:58:25 PM 0
830000 11/28/00 4:01:32 PM 2 OUT FOR BUSINESS
830000 11/28/00 4:01:37 PM 4 OUT FOR THE DAY
830000 11/29/00 1:10:04 PM 4 OUT FOR THE DAY
873001 11/28/00 4:00:02 PM 1 IN
873009 11/28/00 4:01:20 PM 4 OUT FOR THE DAY
873102 11/28/00 4:02:19 PM 0 OUT FOR LUNCH
873220 11/28/00 4:01:55 PM 3 OUT FOR PERSONAL
MyQuery
SELECT DISTINCT tblEmpTime.EmpId
FROM tblEmpTime
WHERE (((tblEmpTime.StatTime) Between [StartDate] And DateAdd("d",1,[StartDate])));
Note: Based on the existing table, I used the data of 11/29/00 for the input [StartDate]. This was, of course, done with manual input of the start date, however programatic variations would generally be prefered.
My Results
EmpId
103002
356461
830000
Of course, if you need additional information, you would need to use the query results as the basis for another lookup.
MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over