Form "ON DIRTY" Event

P

Paul

In Access 2000, modifying data in a text box bound to a table with VBA code
would cause the forms "on dirty" event to fire.

I just ported an application from Access 2000 over to Access 2003 and have
discovered, to my dismay, that modifying data using VBA code causes the forms
"dirty" attribute to be set to true but it does not cause the forms "on
dirty" event to fire.

I have only been able to trigger the even by keying data myself; I even
tried using SENDKEYS in VBA to see if this would trigger the event but it
would not.

Has anyone found a fix for this lack of consistency between Access 2000 and
Access 2003? I hate to have to re-engineer my application that relies on vba
code modification of data to trigger the event.

Thanks
 
V

Van T. Dinh

In your code, you can simply trigger the Dirty Event by a simple Call
statement after you set the new value like:

Call Form_Dirty
 
R

Rick Brandt

Paul said:
In Access 2000, modifying data in a text box bound to a table with
VBA code would cause the forms "on dirty" event to fire.

I just ported an application from Access 2000 over to Access 2003 and
have discovered, to my dismay, that modifying data using VBA code
causes the forms "dirty" attribute to be set to true but it does not
cause the forms "on dirty" event to fire.

I have only been able to trigger the even by keying data myself; I
even tried using SENDKEYS in VBA to see if this would trigger the
event but it would not.

Has anyone found a fix for this lack of consistency between Access
2000 and Access 2003? I hate to have to re-engineer my application
that relies on vba code modification of data to trigger the event.

Thanks

BeforeInsert doesn't fire either if code is used to begin a new record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top