Here's my code that works. The problem is when I hit the button that calls the function, I get a "Type Mismatch" error if all 7 days aren't filled in with start times and end times, and it stops on the first null day.
To explain the code, basically if there is no quit time (employee may still be clocked in), then display "0h 0m" in the hours worked label. Otherwise, subtract the quit time from the start time (produces a time value, like 8:15AM) and then format the hours and minutes section of it. I can't figure out why its not just skipping the null days.
Code:
Dim hrsW As Date
If IsNull(Me.txtSunAcQuit.Value) Then
Me.lblSunHrs.Caption = "0h 0m"
Else
hrsW = Me.txtSunAcStart.Value - Me.txtSunAcQuit.Value
Me.lblSunHrs.Caption = Format(hrsW, "h") & "h " & Format(hrsW, "n") & "m"
End If