473,763 Members | 6,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(Canc el As Integer)
Me.ReceivedDt = Now()
End Sub

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

Dec 19 '06 #1
2 3322
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_beforeUpda te 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

"lindseyhan sen" <li************ @fmc-na.comwrote in message
news:11******** **************@ n67g2000cwd.goo glegroups.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(Canc el 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
7620
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 fill the iframe with content (<body> tag and so on and also insert a <div> tag, inbetween is the content that should be modified). Now if the event "overflow" or "underflow" is triggered the iframe
9
4007
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 records that are being edited, the event does fire. Has this (previous) behaviour been changed by Microsoft?
3
1940
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 enabled. It looks as though the Form_Dirty event isn't firing. The application is developed in A2K, the user is using A2K3 (as are a bunch of other users who aren't experiencing the problem). Anyone have any idea what might be wrong on this...
0
2022
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 did was: In an empty form, I set the Form1.Text to "0" and added the following code for Form1.MouseMove event.
8
4315
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 button at runtime: //----- Code snippet protected System.Web.UI.WebControls.PlaceHolder ImageHolder; private void Page_Load(object sender, System.EventArgs e)
3
1309
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 (since that is the default and I did not supply a CommandName). However, I need to determine which of the three LinkButtons triggered the event. How can I do this? Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
2
1513
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 event is triggered (but not its activated) However, if I am in A, and I click on a button on the toolbar in B, then neither the activate or the enter event is triggered, even though B's toolbar event is triggered. Even more curious, A remains...
0
3697
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 database calls (using a separate DB handler class). "combo1" contains a list of countries and is fairly static, it can be added to but no other external events cause a change in its population. "combo2" however is populated with a list of options...
1
5871
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 move to the first control on the form. When I Shift+tab from the first control on the form, I want the focus to move to the last control in the header. The form is a continuous form. The first control on the form is either a text box or a combo...
0
9563
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9937
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.