G
Guest
I'm coding a MS Access 2000 application where I need to capture the
startingtime of a procedure, the end time of a procedure, and calculate the
total length of the procedure. The user can either manually enter the time
in medium time format or press a button to return the system time (Time() )
in medium format. The code for this button looks like this:
Private Sub cmdStTime_Click()
Forms!frmTilt!txtStTime = Time()
End Sub
The end time is captured behind the scenes when the form is closed. This
too is Time(). Total procedure time is endtime - starttime. The code looks
like this:
dteEndTime = Time()
dteStartTime = Forms!frmTilt!txtStTime
dteProcTime = Format(dteEndTime - dteStartTime, "Medium Time")
This code works in 10 other similar forms. When I run the debugger and step
through the code the application indicates that Time() = null. If I set a
default value on the form for the control (Time() ) the value of system time
is returned.
This has me puzzled. I've compacted, deleted the offending controls and
re-placed new ones, etc.
Any ideas?
Thanks for your help.
startingtime of a procedure, the end time of a procedure, and calculate the
total length of the procedure. The user can either manually enter the time
in medium time format or press a button to return the system time (Time() )
in medium format. The code for this button looks like this:
Private Sub cmdStTime_Click()
Forms!frmTilt!txtStTime = Time()
End Sub
The end time is captured behind the scenes when the form is closed. This
too is Time(). Total procedure time is endtime - starttime. The code looks
like this:
dteEndTime = Time()
dteStartTime = Forms!frmTilt!txtStTime
dteProcTime = Format(dteEndTime - dteStartTime, "Medium Time")
This code works in 10 other similar forms. When I run the debugger and step
through the code the application indicates that Time() = null. If I set a
default value on the form for the control (Time() ) the value of system time
is returned.
This has me puzzled. I've compacted, deleted the offending controls and
re-placed new ones, etc.
Any ideas?
Thanks for your help.