Update ALL records

G

Gee

I've got another problem.

I have a form that gives me a DateDiff between CallDate and CurrentTime
using a timer.

Private Sub Form_Timer()
Dim currentTime As Date
currentTime = Format(Now(), "h:m:s")
Me.txtCurrentTime.Value = currentTime
NOC = DateDiff("n", TimeValue(CallDate), TimeValue(txtCurrentTime))
End Sub

It works fine now, but only the current record updates. If I scroll through
the records NOC updates. If It just sits there on one record, that record
updates.

How do I get ALL the records to update? I tried GoToRecord Next, and that
worked, but then it gets to the end and stops.

This has to be able to just sit there open and update so that if any of the
records NOC reaches 15, an email fires off to Tech1, then if NOC reaches 30,
an email fires off to Tech2. It also needs to add new records when they are
entered into the Backend database.

Thank you in advance for any help you can give me.
 
G

Gee

I figured it out.
I stuck in an IF statement based on CallDate. Now it loops through the
records and updates all the fields automatically.
:)

If CallDate > 0 Then
DoCmd.GoToRecord , , acNext
Else: DoCmd.GoToRecord , , acFirst
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Timer Count 9
Update Open Form 3
Send Email 4
Send Email If 5
update textbox with total 9
Edit records in a subform 6
check subform for records 8
Strange behavior and Error 2105 when oncurrent event cycles 0

Top