By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

form_dirty event triggered from code

P: n/a
Access 2000 with linked tables to SQL Server 2000:

I have a form where I am trying to update a date field when any of the
fields for the current saved record get changed. I am using the
form_dirty event to set this date. I have one database (mdb) where
this works fine. I tried to duplicate the same behavior in a second
mdb, and it causes the form_dirty event to fire at least a hundred
times before it finally 'completes'. This is a problem because I have
other code that fires in the form_dirty event as well, and this slows
the performance of my form considerably.

I thought that maybe I had a problem with my database, so I created a
new database to isolate the functionality. I have the same problem
(repeated firing of the form_dirty event).

When I run the database in Access 2003, it works 'fine'; the form_dirty
event only fires once.

I've re-installed MDAC 2.8 SP1, I've re-installed Office 2000.

The stripped-down code is as simple as:

Private Sub Form_Dirty(Cancel As Integer)
Me.ReceivedDt = Now()
End Sub

Nothing seems to help. Any suggestions would be greatly appreciated!

Dec 19 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I had other problems when I used to use the form_dirty event to update a
"date record changed" field.(they had to do with multiple users and record
locking.)
I switched to putting the code in the form_beforeUpdate event instead, and
now it works fine for me. I think that is the generally 'preferred' way of
doing this. (The only drawback is that you don't see the "date edited" field
change as soon as you type something on the form - it only happens just
before the record is saved.)
-John

"lindseyhansen" <li************@fmc-na.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
Access 2000 with linked tables to SQL Server 2000:

I have a form where I am trying to update a date field when any of the
fields for the current saved record get changed. I am using the
form_dirty event to set this date. I have one database (mdb) where
this works fine. I tried to duplicate the same behavior in a second
mdb, and it causes the form_dirty event to fire at least a hundred
times before it finally 'completes'. This is a problem because I have
other code that fires in the form_dirty event as well, and this slows
the performance of my form considerably.

I thought that maybe I had a problem with my database, so I created a
new database to isolate the functionality. I have the same problem
(repeated firing of the form_dirty event).

When I run the database in Access 2003, it works 'fine'; the form_dirty
event only fires once.

I've re-installed MDAC 2.8 SP1, I've re-installed Office 2000.

The stripped-down code is as simple as:

Private Sub Form_Dirty(Cancel As Integer)
Me.ReceivedDt = Now()
End Sub

Nothing seems to help. Any suggestions would be greatly appreciated!

Dec 19 '06 #2

P: n/a
I appreciate the reply.. it's the *other* code in my event, though,
which requires the form_dirty event to fire. For example, I want a
button on my form to become enabled as soon as the record becomes dirty.

Dec 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.