473,396 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

form_dirty event triggered from code

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
2 3305
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
9
by: HJ | last post by:
Hi all, I notice that the Form_Dirty event does not fire in Access 2002 (SP-1) when the first character is typed into a new record. In previous versions of Access it does fire. For existing...
3
by: Randy Harris | last post by:
I'm using the Form_Dirty event to enable a Save button. There are quite a few users using the app with no problem. One user is complaining that no matter what she does the Save button doesn't get...
0
by: Sam Sungshik Kong | last post by:
Hello! If I understand correctly, MouseMove event is triggered when the mouse moves (ie when point changes). I, however, found out that it's triggered even if the mouse is not moving. What I...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
3
by: Nathan Sokalski | last post by:
I have three LinkButtons in the HeaderTemplate of my DataList (I use them to let the user determine what to sort the list by). I am assuming that the event will be bubbled to the ItemCommand event...
2
by: ari | last post by:
I have an MDI form with a listview and a toolbar. I have 2 instances of this form running at once - lets call them A and B. If I am in A, and I click on the listview control in B, then B's enter...
0
by: Paul Hadfield | last post by:
I'm looking for thoughts on the "correct" design for this problem (DotNet 2.0 - in winforms, but that's not so important). I've got two combo boxes (combo1 and combo2), both are populating via...
1
by: dana1 | last post by:
I have a form with several combo boxes in the header used to determine the records that will be displayed on the form. When I tab or enter from the last combo box in the header, I want the focus to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.