Solved

Event triggered on next record

Posted on 2013-11-27
5
534 Views
Last Modified: 2013-11-27
What events are triggered when going to another record under the same form?  I need to capture some fields when a record is opened.  The first record is easy.  I can get that in the form open event.  I think I can get the next one with the after update if a field has been changed.  I need to have a way a capturing the data if no fields are changed.  Actually that method would work for after update too.  So is there an event for going from one record to the next?

Thanks,
Ric
0
Comment
Question by:Joppa
  • 2
  • 2
5 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39680832
the On Current event is triggered when you move from record to record without changing anything
0
 
LVL 57
ID: 39680837
BeforeUpdate, AfterUpdate, and AfterInsert if your leaving a record that is dirty (changed), and OnCurrent when a record gets the focus.

You'll probably want to use OnCurrent.

Just be aware that OnCurrent may fire multiple times for the same record.

Jim.
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 39680875
@jim
<Just be aware that OnCurrent may fire multiple times for the same record.>

i don't think so..

On Current fires only when the focus moves from one record to another.
0
 

Author Closing Comment

by:Joppa
ID: 39680920
Works great....thanks
0
 
LVL 57
ID: 39681085
<<@jim
<Just be aware that OnCurrent may fire multiple times for the same record.>

i don't think so..

On Current fires only when the focus moves from one record to another. >>

 That's not the case.  It also will fire if a form is refreshed or required.  When that happens, the focus doesn't move, but the OnCurrent will fire.  Try applying a filter/sort, note the record your on, then remove it and see what happens<g>.  Or just to a Me.Refresh.  OnCurrent will fire.

 As a result, depending on what your doing, you may need to protect your code from getting into an infinite loop by setting a flag.

Jim.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now