Full Version: on current/on dirty question
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
edojan
I have a form linked to query that displays the data, can freely edit the date and go from one record to another ....
For entire form level not individual fields ....
How can i detect if one of the fields is changed and if changed ask if they want to save prior to going to next record?
(you can used scroller on mouse to move and do edits on the fly...)

Thanks!

Edited by: edojan on Thu Jun 4 13:15:21 EDT 2009.
Doug Steele
Are you asking how to detect if any of the fields are changed, or if one specific field is changed?

If any of the fields, use the form's BeforeUpdate event.

If a specific field, use that control's AfterUpdate event.
Bob_L
Just to explain Doug's answer a little more -

The Form's BEFORE UPDATE event will ONLY fire if there has been a change to an existing record OR data has been entered into at least one control of a new record. There is also the form's DIRTY event which will fire IMMEDIATELY upon the FIRST change to any control of an existing record or the start of entry to a new record.
edojan
Thank you!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.