troubleshooting Question

Trying to Troubleshoot Form_Timer Code for if statement using DateDiff in Access Form

Avatar of Jarred Meyer
Jarred MeyerFlag for United States of America asked on
Microsoft Access
7 Comments2 Solutions400 ViewsLast Modified:
I have a code on a continuous form that I'm trying to get the Form_Timer function to GoTo a new record if the current record's TimeIn is 60 seconds less than the CurrentTime. So once the record has been sitting there for 60 seconds, based on the TimeIn then it moves to a new record and sets focus to OperID.

Here is my current VBA that is not working.

Private Sub Form_Timer()


If DateDiff("s", Me.TimeIn, Time()) > 60 Then


DoCmd.GoToRecord , , acNewRec


End If

End Sub
Jarred Meyer
Production Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros