?
Solved

Subform Event that recognizes record change

Posted on 2008-06-10
8
Medium Priority
?
981 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
[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
  • 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

777 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