code for a date/time field to get total hours

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • donnan33
    New Member
    • Jan 2012
    • 1

    code for a date/time field to get total hours

    I have a time sheet in access with the foloowing fields.

    starttime
    timeout1
    timein1
    timeout2
    timein2
    finishtime

    I am trying to get the total hours worked for each day.
    most of the time the timeout2 and timein2 will be blank or null.

    I am not very good at coding but am learning on the fly.

    My problem is, if the timeout2 and timein2 fields are blank/null how do i get it to then calculate timein1 to finishtime? I do need it to calculate timeout2 and timein2 if time is entered in those fields though and ignore them and go to timein1/finishtime if blank/null.


    can anyone please help? I have attached a quick sample. I tried to do it in the query but no luck. I there is code possible please advise. thanks again.....:)
    Attached Files
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32668

    #2
    It's good to include the fields, though as it's Access I assume they are in a table rather than a sheet.

    What you need to include in the question though, is the logic you wish to implement. Without this we are just guessing at the question, which is not good for anyone.

    Comment

    Working...