I have a continuos form and on this form I have a textbox named "txtHrsRecu" and another one named CallTime.
Most of my textbox are linked to my table named Data_tb except for the CallTime, since I want the Call time to calculate how long the call has been open, therefore take the information stored in table on field HrsRecu and keep it looping with the time now therefore time()
I also have a lable named lblClock, which shows the curret data and time.
Here is my code, but it's not working properly...
It calculate the time for every records, but they are all the same, it doesn't take in account the time that is stored in HrsRecu in my table....
Can someone please help..
***************************
Dim StartTime As Date
Private Sub Form_Timer()
Me![CallTime] = DateDiff("n", StartTime, Time())
Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM"
End Sub
Private Sub Form_Open(Cancel As Integer)
StartTime = Me!HrsRecuCall
Me.TimerInterval = 1000
End Sub
Private Sub Btn_HrsFinCall_Click()
' Stop calculating Time
Me.TimerInterval = 0
End Sub
*******
Btn_HrsFinCall is a button that I press to close the call but I need it to also close the looping time and store it in the Data_tb.....
Most of my textbox are linked to my table named Data_tb except for the CallTime, since I want the Call time to calculate how long the call has been open, therefore take the information stored in table on field HrsRecu and keep it looping with the time now therefore time()
I also have a lable named lblClock, which shows the curret data and time.
Here is my code, but it's not working properly...
It calculate the time for every records, but they are all the same, it doesn't take in account the time that is stored in HrsRecu in my table....
Can someone please help..
***************************
Dim StartTime As Date
Private Sub Form_Timer()
Me![CallTime] = DateDiff("n", StartTime, Time())
Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM"
End Sub
Private Sub Form_Open(Cancel As Integer)
StartTime = Me!HrsRecuCall
Me.TimerInterval = 1000
End Sub
Private Sub Btn_HrsFinCall_Click()
' Stop calculating Time
Me.TimerInterval = 0
End Sub
*******
Btn_HrsFinCall is a button that I press to close the call but I need it to also close the looping time and store it in the Data_tb.....