Problem with Continuous Form

Dina01

Registered User.
Local time
Today, 17:36
Joined
Apr 24, 2002
Messages
87
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 find continuous forms to not be the best place to perform changes such as this. The reason is that when you refer to a control on the cont. form, you are actually referring to EVERY instance of that control (in other words - every record). Perhaps you could have a command button that opens a popup form that shows or records the beginning and end time for each record?
 

Users who are viewing this thread

Back
Top Bottom