G
Guest
I'm working on a time log and have a form with three text boxes, and I want
to subtract my finish time from my start time and put this in a third box.
The following code give me a 13 Type mismatch error.
Private Sub cmdStart_Click()
Me.txtStart = Format(Now, "mmmm dd yy, h:mm:ss AMPM")
End Sub
Private Sub cmdFinish_Click()
Me.txtFinish = Format(Now, "mmmm dd yy, h:mm:ss AMPM")
Me.txtTime = DateDiff("h", [txtStart] - [txtFinish])
End Sub
What am I doing wrong? Thanks!
John
to subtract my finish time from my start time and put this in a third box.
The following code give me a 13 Type mismatch error.
Private Sub cmdStart_Click()
Me.txtStart = Format(Now, "mmmm dd yy, h:mm:ss AMPM")
End Sub
Private Sub cmdFinish_Click()
Me.txtFinish = Format(Now, "mmmm dd yy, h:mm:ss AMPM")
Me.txtTime = DateDiff("h", [txtStart] - [txtFinish])
End Sub
What am I doing wrong? Thanks!
John