On my form I have fields for StartTime, EndTime, and Log hours
I want to record the time that elapses b/w the 2 times whether it be minutes, hours but I have been unsucessful.
I have tried:
But I keep getting 0 in my loghours field
Don't know what i'm doing wrong. Any help will be appreciated.
Thanks
Code:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.StartTime = Format(Now, "hh:mm:ss AMPM")
End Sub
Private Sub TotalWorkedPgs_AfterUpdate()
Me.EndTime = Format(Now, "hh:mm:ss AMPM")
End Sub
I want to record the time that elapses b/w the 2 times whether it be minutes, hours but I have been unsucessful.
I have tried:
Code:
Private Sub cmdSumbit_Click()
[LogHours] = Format([Starttime] - 1 - [Endtime], "Short Time")
End Sub
Code:
Private Sub cmdSumbit_Click()
LogHours = DateDiff("n", [Starttime], [Endtime])[LogHours] = Format([Starttime] - 1 - [Endtime], "Short Time")
End Sub
But I keep getting 0 in my loghours field
Don't know what i'm doing wrong. Any help will be appreciated.
Thanks