Hey
I have a continuous form and I am trying to make one of the fields calculate the time the call has been open, therefore the time will increment until the call is ended...
I have a label named lblClock and the textbox is name txtCallTime.
My field sin my table that the time comes form is named HrsRecuCall...
I guess I have to calculate the current time - hrsRecuCall, and it keep on incrementing until the Finigsh button ic click on and then store the result into the table..
This si the following code I have but the problem is the code doesn't update on the other records therefore the same amount of minutes that I see in txtCallTime on the first record, all the others have the same data.......
Does anyone know how to do this?
Dim StartTime As Date
Private Sub Form_Timer()
Me![txtCallTime] = DateDiff("n", StartTime, Time())
Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM")
Me.Repaint
End Sub
Private Sub Form_Open(Cancel As Integer)
StartTime = Me!HrsRecuCall
Me.TimerInterval = 1000
End Sub
I have a continuous form and I am trying to make one of the fields calculate the time the call has been open, therefore the time will increment until the call is ended...
I have a label named lblClock and the textbox is name txtCallTime.
My field sin my table that the time comes form is named HrsRecuCall...
I guess I have to calculate the current time - hrsRecuCall, and it keep on incrementing until the Finigsh button ic click on and then store the result into the table..
This si the following code I have but the problem is the code doesn't update on the other records therefore the same amount of minutes that I see in txtCallTime on the first record, all the others have the same data.......
Does anyone know how to do this?
Dim StartTime As Date
Private Sub Form_Timer()
Me![txtCallTime] = DateDiff("n", StartTime, Time())
Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM")
Me.Repaint
End Sub
Private Sub Form_Open(Cancel As Integer)
StartTime = Me!HrsRecuCall
Me.TimerInterval = 1000
End Sub