Go Back   Access World Forums > Microsoft Access Reference > Microsoft Access Tutorials

Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
Old 03-27-2011, 11:42 AM   #1
missinglinq's Avatar
Join Date: Jun 2003
Location: Richmond (Virginia that is!)
Posts: 6,275
Thanks: 11
Thanked 710 Times in 660 Posts
missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light
On Dirty

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.

Linq ;0)>

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.
missinglinq is offline   Reply With Quote
The Following 10 Users Say Thank You to missinglinq For This Useful Post:
bigmac (08-11-2016), delikedi (04-04-2012), divanov (02-04-2015), EmilyTheChef (03-14-2012), esowork (06-05-2015), hilian (10-24-2016), NauticalGent (01-08-2016), pitt_ph (09-07-2012), SmallTime (09-07-2011), VbAaron (02-28-2013)

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
On Dirty Rockape Forms 10 03-29-2011 02:42 AM
If Me.dirty then Me.dirty = False ions General 13 02-06-2011 11:56 PM
Why oh why cant i do 'If dirty' bunji Forms 3 07-31-2006 07:24 AM
Which fields are dirty in a dirty record? torok Forms 2 05-24-2002 05:04 PM

All times are GMT -8. The time now is 12:27 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World