A fellow member advised me to start a new thread concerning this problem. I don't want the user to have control on entering times so I have:
I need to get log hours as a Numberso that I can get the sum of hours and convert it into days.
I get 0 for Log Hours for each one of those. Any suggestions?
Code:
Private Sub Form_BeforeInsert(Cancel As Integer)
'Fill in Start Time
Me.Starttime = Format(Now, "Short Time") '",hh:mm:ss AMPM"
'Fill in Date
Me.LogDate = Format(Now)
End Sub
Code:
Private Sub txtTotalWorked_AfterUpdate()
'Fill in End Time
Me.Endtime = Format(Now, "Short Time") 'hh:mm:ss AMPM
End Sub
I need to get log hours as a Numberso that I can get the sum of hours and convert it into days.
Code:
Private Sub Endtime_AfterUpdate()
[LogHours] = ([Endtime] + [Starttime]) * 24
End Sub
Code:
[loghours] = Format(DateDiff("n", Me.Starttime, Me.Endtime) / 60, "#0.0")
Code:
[LogHours] = CDate([Endtime]) - CDate([Starttime])
I get 0 for Log Hours for each one of those. Any suggestions?