Try this out.
Code:
DateDiff("h", TimeIn, TimeOut + 1) mod 24 as GoodTime
TimeOut + 1 : Adds 1 day to the TimeOut value
So you end up with (for your example record)
TimeIn TimeOut + 1
1/1/1900 5:00 PM 1/2/1900 2:00 AM
which is what you want.
The beauty off this is the MOD function, which will return the remainder of a division operation.
So, say you are 9 am to 5 pm:
TimeIn TimeOut + 1
1/1/1900 5:00 PM 1/2/1900 5:00 PM
Using DateDiff, you get 32 hours. But by using the MOD function, we get only the remainder which is 8 (and correct).
The only thing you need to worry about with this is the potential for employees to work 3 days in a row, or something. Although the way your data is stored does not really allow for this anyway, so you should be good.
Hope this helps,
Alex
[small]----signature below----[/small]
I'm pushing an elephant up the stairs
My Crummy Web Page