Originally Posted by
qa12dx
i had done this long time back. the main headache will be if u have shifts that start and one day and end on another. typically night shifts.
how i had done it was i first took all the time record data inserted in a table
empl_cd, date, time1,time2,time3,time4,time5,time6,time7,time8,ti me9,time10 (empl_cd and date is pk, so no dups)
basicaly 5 pairs of time. people take short leave slips to run personal errands or lunch, etc. in my case i found 5 pairs of times sufficed.
1st i had a append query to add empl_cd and date.
then update query to update time1 with min([time]) of the time record table. then i appended that record ID to a logged table containing just these record ID's.
now i did the same for time2,3,4, ... EXCLUDING the ID's in the logged table. so everytime you updated the time, u again run the append query to record the ID
once you have all the empl data by date in a single row, it becomes more simple.
getting the time part of the datetime - TimeValue([datEvent])
my suggestion is if you dont have to do these, don't. the reason is people forget to log in, log out. sometimes people log in more than once, thinking they haven't log-in or out. and since it is tied with salaries, when things go wrong, u'll b in a sh!t storm