Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access 2003 on dirty event 1

Status
Not open for further replies.

James529

MIS
Feb 21, 2002
47
US
Have an access 2000 project I just ported over to another computer running acccess 2003. Tried searching but came up empty handed........

I just started testing the application and, either converted to '03 or as 2000 mdb, I have the same problem, the on-dirty events on my forms do not fire.

Has anyone experienced this and have fixed it? Any other quirks people have uncovered?

thanks
 
Read the link you referred me to.

Here is the issue and rusults of some comparitive 2000 / 2003 testing.

In access 2000, if you use VB code to change the contents of a text box or otherwise dirty a "clean" form, the on dirty event will fire.

in access 2003, changing the contents of a record displayed on a form with VB code set's the dirty attribute to true but the on dirty event will not fire.

Just to make sure nothing was amiss with the conversion from 2000 to 2003, using access 2003, I created a new form and linked it to a new table. On the form, I added a button with on click event that first, displayed the forms dirty attribute, second, changed the contents of a text box linked to a row in the new table and third, displayed the forms dirty attribute. In the on dirty event, I put code that displayed a message.

When I click the button, the message displays the forms dirty property as false, the contents of the field changes and the message displays the form dirty property as true. The on dirty property of the form does not fire.

On my other computer with access 2000 installed, I set up the exact same test mirroring the scenario in the 2003 test.

the results are identical with the exception that the forms on dirty event fires immediately following the vba code that changes the contents of the text box.

the tests prove that modifying contents of a record on a form using vba code causes the forms on dirty event to fire in access 2000 but does not cause the event to fire in access 2003.

further testing reveals that, as stated in the article you linked me to, in access 2003, user or keyboard input is required for the event to fire.

i think i will try another test to see if using sendkeys to modify the data will cause the event to fire in access 2003.

Overall, i am disappointed at the inconsistency between the two releases as I have application that relies on the event firing when using vba to modify records on a form.

shucks
 
OK, testing further, the sendkeys statement in vba will trigger the on dirty form event in access 2000 but will not trigger the event in access 2003 (horrible inconsistency).

so, I've got to dig myself out of this rut and redesign a bunch of forms logic or stick with access 2000. microsoft just kills me.
 
Yes, but it's a slow death! It really is a pain! Dropping a feature in an new version because it caused problems in the past or because a new feature does the same thing better is one thing, but to retain a feature and simply change how it works is really poor design. Just out of curiosity, what are you attempting to do with the OnDirty event?

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top