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

OnDirty only working once

JC
I have a form based on a query. I have the OnDirty event launch a
procedure that enables my custom "Save" button. I press Save after
making my changes and the record is saved. At the end of the Save
procedure I disable the "Save" button. If I then want to change
something else on that same record, the OnDirty event never fires.
If I move to the next record and then back to the present record,
making a change DOES fire the OnDirty event.

Does anyone know why the OnDirty event does not fire the second time
unless I change records?
I have tried to Requery and even programmatically move to another
record and then back to the present record, but I still cannot get it
to work.

Thanks in advance.
- jc -

Nov 13 '05 #1
4 3054
What method are you using in the Save button's click event to save the
record? Have you tried

Me.Dirty = False

I tested this and Dirty fires again when I go to change the record I just
saved.

--
Wayne Morgan
MS Access MVP
"JC" <jc********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I have a form based on a query. I have the OnDirty event launch a
procedure that enables my custom "Save" button. I press Save after
making my changes and the record is saved. At the end of the Save
procedure I disable the "Save" button. If I then want to change
something else on that same record, the OnDirty event never fires.
If I move to the next record and then back to the present record,
making a change DOES fire the OnDirty event.

Does anyone know why the OnDirty event does not fire the second time
unless I change records?
I have tried to Requery and even programmatically move to another
record and then back to the present record, but I still cannot get it
to work.

Thanks in advance.
- jc -

Nov 13 '05 #2
On 29 Jul 2005 10:36:57 -0700, "JC" <jc********@gmail.com> wrote:

<soapbox>
Sigh, how some people want to mangle the standard Access interface.
</soapbox>

Saving a record can be done several ways. Perhaps you could try it
this way:
Me.Dirty = False

After that, the Dirty event will fire again when you edit the same
record.

-Tom.
I have a form based on a query. I have the OnDirty event launch a
procedure that enables my custom "Save" button. I press Save after
making my changes and the record is saved. At the end of the Save
procedure I disable the "Save" button. If I then want to change
something else on that same record, the OnDirty event never fires.
If I move to the next record and then back to the present record,
making a change DOES fire the OnDirty event.

Does anyone know why the OnDirty event does not fire the second time
unless I change records?
I have tried to Requery and even programmatically move to another
record and then back to the present record, but I still cannot get it
to work.

Thanks in advance.
- jc -


Nov 13 '05 #3
JC
Thank you Wayne and Tom...I have been away from the computer and did
not get a chance to read the board for a while. I will try that this
afternoon.
- jc -

Nov 13 '05 #4
JC
Tom, Wayne,
That did just what I wanted - thank you.
- jc -

Nov 13 '05 #5

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

Similar topics

7
by: Anthony Hendrata | last post by:
Hello All, I know this may be easy for some people, but I need some help on a little programming. I have this application that has been developed in Access, there is a textbox call FindByName...
5
by: Jeff Johnson | last post by:
I'm using forms authentication to protect a subfolder within my site. I've got it working fine except for two issues: (1) When I do a RedirectFromLogin page I have to put a cookie path ("/"...
5
by: Andrea Williams | last post by:
I'm working with C# and I'm setting up some ENUM's I have a data and Business layer. I'm declaring a common enum for the Data Layer. The UI layer references the Bus layer and the bus layer...
7
by: Jairo Nieto | last post by:
Hi, I've had this extremely weird problem for a week or so, and havent been able to solve it. My solution works fine on the production server. Once I deploy it, all buttons stop posting back...
0
by: TurboT | last post by:
We had a an intermittent problem with the aspnet links on our external website. It seemed to be related to the following, but I was wondering if there is some timeout, or caching parameter which...
6
by: pmud | last post by:
Hi, I have created a very simple ASP.NET application which has a couple of ImageButtons which go to different SQL reports on clicking them. I have used Response.Redirect to send the user to the ...
8
by: Christopher Kurtis Koeber | last post by:
Dear All, Recently I created a thread about trying to load a particular ICON image that GDI plus could not load. I realized that GDI plus definitely does not support it because it had a certain...
7
by: vamichael | last post by:
When I try to run the Website Administration Tool from my published application using http://localhost/myapp/webadmin.axd I am getting a "resource not found" error message. I can use the...
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
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...

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.