Perhaps something like this, you could put these three functions into a query *the first is perhaps a bit unnecessary as a function you can just use DateDiff for the total working hours afterall*
Function total_hours(t_in, t_out)
'calculate hours worked
hours_worked = DateDiff("n", t_in...