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
Solved

Subform Event that recognizes record change

Posted on 2008-06-10
8
959 Views
Last Modified: 2013-11-28
I have a form with subform.  I need to run a validation routine each time the user changes between records on the subform.  I've tried the On Lost Focus event and the Before Update event, but both seem only to run after you change something in the record on the subform.  In the Microsoft articles they talk about a RecordExit event, but I can't locate this event on the event property sheet.  Is there any event that will always be triggered when you change records?  
0
Comment
Question by:commix
  • 4
  • 2
8 Comments
 
LVL 75
ID: 21756604
The On Current Event.

mx
0
 
LVL 75
ID: 21756605
Turns out the RecordExit  event - as I recall - IS mentioned in the documentation, but .. it apparently was never implemented.

mx
0
 

Author Comment

by:commix
ID: 21756613
The on Current event seems to run when you enter the record, generating warnings to the user related to fields which have not yet been filled in the user.  I'm looking for an event which only runs when you "leave" the record.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 21756640
There is no specific event that triggers when you 'leave' a record.  You really want to use the Before Update - that is where validation is supposed to occur ... and then intent of that event.

mx
0
 

Author Comment

by:commix
ID: 21756701
I currently use the Before Update event.  The validation routine for instance finds a mistake, asks the user to correct it and sets the focus to the control which needs to be corrected.  If the user does not do anything but tries again to move the focus to another record, the Before Update event will not be triggered again as there were no changes at all.  
0
 
LVL 75
ID: 21756712
"he Before Update event will not be triggered again as there were no changes at all.  "

Not the case.  As long as the record remains 'Dirty' ... the before update will continue to trigger ... unless something VERY unusual is happening.

mx
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

809 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