Solved

Subform Event that recognizes record change

Posted on 2008-06-10
8
933 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

707 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

17 Experts available now in Live!

Get 1:1 Help Now