Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Event triggered on next record

Posted on 2013-11-27
5
Medium Priority
?
571 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39680832
the On Current event is triggered when you move from record to record without changing anything
0
 
LVL 58
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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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 58
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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 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