When a record is accessed, the first time any bound control on a bound form has data entered/edited, the form becomes Dirty and the OnDirty event is executed. Sounds simple, but this is Access, so naturally it isn't!
This occurs only the first time! If the same control has data entered a second time or another control has data entered, the form is still Dirty, but the OnDirty event will not execute again.
If data is entered into a Control thru VBA code, say
Me.MyTextbox = "Some Value"
or any other way except physically entering the data, the form will be Dirty, but the OnDirty event will not execute!
If data is entered into a Control thru VBA, as noted above, the form will be Dirty but subsequent physically entering data into the form will not cause OnDirty to execute.
Lastly, data entered by way of a control's Default Value while it 'enters' data, does not make the form Dirty and it does not cause the OnDirty event to fire.
The Devil's in the Details!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(All code solutions tested in Access 2003/2007, before posting, unless otherwise noted.)
Last edited by DCrake; 03-29-2011 at 11:41 PM.