Solved

Subform Event that recognizes record change

Posted on 2008-06-10
8
943 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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 …

895 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

19 Experts available now in Live!

Get 1:1 Help Now