473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

a2k - simple way of detecting data changes in app

In my app I have lots of forms with data presented in various ways
using all kinds of controls.

Is there a simple way of detecting if the user has changed any data? I
would like to do this so I could set a boolean value to True and then I
could use that to modify what is displayed on my reports.

In my dim memory is there a dirty property for forms that would do
this? Would that always work for every form? Most, if not all, of my
forms are bound to tables and queries.

thanks
Martin
Nov 13 '05 #1
2 2246
The On Dirty form property fires when there is any activity on the form; the
On Change event fires when a control's value has been changed. A common
solution is to create a date/time field in your underlying table, then on
the data entry form's Before Update event, put:
Me!myUpdateFiel d = Now()
This will record a new date/time when any value on the form has been
changed.

Not sure how you're running your reports, but they will always have the
current values of the bound recordset. Do you really want to reprint
reports every time there is a data change?
-Ed

"Deano" <ma**********@g mail.com> wrote in message
news:xn******** *******@usenet. plus.net...
In my app I have lots of forms with data presented in various ways
using all kinds of controls.

Is there a simple way of detecting if the user has changed any data? I
would like to do this so I could set a boolean value to True and then I
could use that to modify what is displayed on my reports.

In my dim memory is there a dirty property for forms that would do
this? Would that always work for every form? Most, if not all, of my
forms are bound to tables and queries.

thanks
Martin

Nov 13 '05 #2
Ed Robichaud wrote:
The On Dirty form property fires when there is any activity on the
form; the On Change event fires when a control's value has been
changed. A common solution is to create a date/time field in your
underlying table, then on the data entry form's Before Update event,
put: Me!myUpdateFiel d = Now()
This will record a new date/time when any value on the form has been
changed.

Not sure how you're running your reports, but they will always have
the current values of the bound recordset. Do you really want to
reprint reports every time there is a data change?
-Ed


Thanks for the tip. It's not that but I have a label that shows the
last backed up data. If they make a change without explicitly creating
a new backup then I don't want that label to be printed as it will be
misleading.
Nov 13 '05 #3

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

Similar topics

5
12492
by: Jole | last post by:
Hi I'm writing a program that needs to read from a file. In order for the program to be robust, it should somehow check that the file isn't corrupt, or stuffed in any way. For example, that file may have been created but a crash occurred at that point in time (while it was being created), damaging the file. Now, my program which needs to...
0
2724
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the desktop resolution. I have tried trapping the following events: 1) SDL_ACTIVEEVENT 2) SDL_VIDEOEXPOSE
1
2850
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the desktop resolution. I have tried trapping the following events: 1) SDL_ACTIVEEVENT 2) SDL_VIDEOEXPOSE 3) SDL_VIDEORESIZE
5
3700
by: Rich | last post by:
I have a simple, single threaded program in C++ that runs as Idle priority. The program creates some data which needs dumping to file if the computer is shutdown or logged out. At the moment there is almost no Win32 code in it (only a few lines to do the idle priority class). What is the simplest way of programatically detecting the...
3
1946
by: Chung Leong | last post by:
Anyone knows a good algorithm for detecting difference between two pieces of text? I'm working on a content management system and would like to add the ability to highlight changes made between versions. I don't think diff is suitable here, since I want word level detection. Besides, I'll need to handle a large number of relatively short...
51
8225
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct code? many thx!
2
1392
by: Simon Harvey | last post by:
Hi all, Is there any easy way to check a field for calues that have changed on a post back. So the page is sent to the user, the user changes some values and I need to know which ones changed. Is the only way to do this to go through all the fields and check them against their old values. In which case, would I need to store the values...
5
1818
by: needin4mation | last post by:
Hi, I have an asp.net 1.1 application that populates data from a database. When the user changes data, they have to hit a button to update the data. The data entry form (same form that is populated) is from several different tables. To the user, of course, this is not seen. Scenario: After the page is populated, assume a change is made...
5
10982
by: Bob | last post by:
Using Vs 2005 and Vb.NET I want to give users a message asking if they're sure they want to close the form if they had made changes to the underlying data. How do I detect if changes had been made by user but not yet saved? Thanks, Bob
0
7928
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7775
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...
0
5997
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...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4963
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...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
726
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...

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.