473,386 Members | 1,835 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,386 software developers and data experts.

Access 2002: Form_Dirty does not fire

HJ
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?

HJ
Nov 13 '05 #1
9 3983
I'm not seeing this behavior in Access 2002 SP3.

Are you sure the record is not being dirtied programmatically?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"HJ" <hj********@spamhotmail.com> wrote in message
news:41***********************@dreader16.news.xs4a ll.nl...
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?

HJ

Nov 13 '05 #2
The OnDirty event only fires for bound controls, and bound forms. Also, if
VBA code makes any change to a bound form, it can prevent the Dirty event
from firing unless you specifically set Dirty to False after your code
executes.
Darryl Kerkeslager

"HJ" <hj********@spamhotmail.com> wrote:
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.

Nov 13 '05 #3
HJ
Hi,

Thanks for responding. The form is bound to a table and it is not being
dirtied programmatically; I am 'just' entering a new record. That means that
both the BeforeInsert and the Dirty event should fire. The BeforeInsert
event does fire, the Dirty one does not.

I have now also seen this behaviour on another form that does not have a
BeforeInsert event. Here too the Dirty event does not get fired.

Still, this only happens in Access 2002. In Access 2000 the Dirty event gets
fired all the time (and I like that!).

HJ

"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in message
news:B8********************@comcast.com...
The OnDirty event only fires for bound controls, and bound forms. Also, if VBA code makes any change to a bound form, it can prevent the Dirty event
from firing unless you specifically set Dirty to False after your code
executes.
Darryl Kerkeslager

"HJ" <hj********@spamhotmail.com> wrote:
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.


Nov 13 '05 #4
I have not seen this behavior (Thankfully). I use A2002, but save my mdb as
A2000 for compatibility. Perhaps that is the difference.
Darryl Kerkeslager

"HJ" <hj********@spamhotmail.com> wrote:
Still, this only happens in Access 2002. In Access 2000 the Dirty event gets fired all the time (and I like that!).

Nov 13 '05 #5
HJ
Nope, same here. I am quite stumped. The workaround is, of course, to call
the Dirty event from the BeforeInsert event, but that does not really solve
the initial problem.

HJ

"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in message
news:FL********************@comcast.com...
I have not seen this behavior (Thankfully). I use A2002, but save my mdb as A2000 for compatibility. Perhaps that is the difference.

Nov 13 '05 #6
"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in
news:FL********************@comcast.com:
I have not seen this behavior (Thankfully). I use A2002, but save
my mdb as A2000 for compatibility. Perhaps that is the
difference.


The "dirty event" exists only *after* A2K, no (as opposed to the
"dirty property/method")?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #7
Darryl Kerkeslager wrote:
The OnDirty event only fires for bound controls, and bound forms. Also, if
VBA code makes any change to a bound form, it can prevent the Dirty event
from firing unless you specifically set Dirty to False after your code
executes.


Setting Dirty to false will force a save of the record, not good if
you're just starting out and there are required fields not yet entered.

--
This sig left intentionally blank
Nov 13 '05 #8
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:Xn**********************************@24.168.1 28.78...
"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in
news:FL********************@comcast.com:
I have not seen this behavior (Thankfully). I use A2002, but save
my mdb as A2000 for compatibility. Perhaps that is the
difference.


The "dirty event" exists only *after* A2K, no (as opposed to the
"dirty property/method")?


It's on Microsoft's "What's New" page for Access 2000.

http://msdn.microsoft.com/library/de...a2000intro.asp

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #9
True. I usually fill all required fields in first by code, or set a default
value.

Darryl Kerkeslager

"Trevor Best" <no****@besty.org.uk> wrote:
Darryl Kerkeslager wrote:
The OnDirty event only fires for bound controls, and bound forms. Also, if VBA code makes any change to a bound form, it can prevent the Dirty event from firing unless you specifically set Dirty to False after your code
executes.


Setting Dirty to false will force a save of the record, not good if
you're just starting out and there are required fields not yet entered.

Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Noesis Strategy | last post by:
When I ordered my new laptop, Sony didn't offer Access 2003 in its bundles. Recently, I have begun to design Access databases using an copy of Access 2002 from my previous laptop. It works fine,...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
2
by: Bruce Dodds | last post by:
I will be doing an app for a nonprofit. It would be useful for them to have a good entry-level book on Access so that they don't have to pay someone to design all their queries and reports. I'm not...
8
by: David Kistner | last post by:
I'm fairly new to Access (I've worked with Oracle and MySQL in the past). I was asked to build an application for a small office and told that I had to use Access 2002. I was VERY uncomfortable...
9
by: Neil Ginsberg | last post by:
I have a strange situation using Access to automate a Word mail merge. Using Access 2000 and Word 2000, the code opens Word, opens the document in Word, sets a table in the calling Access...
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...
5
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1....
2
by: lindseyhansen | last post by:
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...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.