I built a simple time clock database. The table has four columns:
- ID (autonumber)
- EmployeeID
- TimeIn (Date/Time)
- TimeOut (Date/Time).
An employee sees only a form with two buttons, Clock In and Clock Out.
Each button has an On Click event to add a new record to the table with the fOSUserName
and Now()
under TimeIn
or TimeOut
, depending on which button is clicked.
All of this works great, however, I need a report to show the number of hours worked per day. In order to get a report with accurate DateDiff()
, the TimeIn
and TimeOut
data has to be on the same row. I've tried LastModified, MovePrevious/MoveNext, and IfNull and I can't get TimeOut on the same row without manually moving it.