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" <lindsey.hansen@fmc-na.comwrote in message
news:1166559112.021375.312800@n67g2000cwd.googlegr oups.com...
Quote:
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!
>
|