473,408 Members | 2,839 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,408 software developers and data experts.

Tracking changes made to form...

YYZ
Just wondering if there is a good way to do this that won't take me
forever and a day.

My form has many textboxes and comboboxes and radio buttons and
checkboxes on it. I want to know if a user changes a value on any of
those things...and if so, when they close the form, if they haven't
saved, prompt them to do so.

I can go into every textbox's TextChanged event and add this code:
bChanges = True - however, this will take a LONG time...is there some
neat special new .Net way of tracking if any data has changed on the
form? Or do I have to add that line of code to every control?

Matt

Mar 15 '06 #1
4 1685
Well,

Not sure about a great way, but seems you could loop through all textbox
controls and AddHandler to add one handler to them all for TextChanged.

That way you'd have one routine that handles text changes for all textboxes.

HTH,

Shane
"YYZ" <ma********@gmail.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
Just wondering if there is a good way to do this that won't take me
forever and a day.

My form has many textboxes and comboboxes and radio buttons and
checkboxes on it. I want to know if a user changes a value on any of
those things...and if so, when they close the form, if they haven't
saved, prompt them to do so.

I can go into every textbox's TextChanged event and add this code:
bChanges = True - however, this will take a LONG time...is there some
neat special new .Net way of tracking if any data has changed on the
form? Or do I have to add that line of code to every control?

Matt

Mar 15 '06 #2
YYZ
Great idea -- thanks for that. One quick question...will there be any
unintended consequences if I already HAVE a handler for a textbox, and
then I add another for the changes thing?

Matt

Mar 15 '06 #3
"YYZ" <ma********@gmail.com> schrieb
Great idea -- thanks for that. One quick question...will there be
any unintended consequences if I already HAVE a handler for a
textbox, and then I add another for the changes thing?


No.
Armin
Mar 15 '06 #4
YYZ
> > Great idea -- thanks for that. One quick question...will there be
any unintended consequences if I already HAVE a handler for a
textbox, and then I add another for the changes thing?


No.


Great! That sounds like a great solution, then. Now I'll do some time
testing on how it affects the performace to dynamically add those
handlers at run time.

Matt

Mar 15 '06 #5

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

Similar topics

3
by: Kyle Friesen via AccessMonster.com | last post by:
Mike, I have databse that creates a "tracking number" based on the selections made on the form via concatenating. At the end of the tracking number, I need a two digit (01-99) sequence number by...
1
by: ken | last post by:
Hi, I have a database that spits out reports. It takes a while for the report to be ready and many people contribute. I need to keep track of what changes are made. It would be nice to keep track...
3
by: johnny boy | last post by:
Hi, Is there any simple or easy way to track changes in Access in between saving access files? I think the answer is probably no but maybe someone can help. John
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
1
by: fred tate via .NET 247 | last post by:
I'm working on a project that will track a great deal of data forindividuals and will keep track of users for a very long time (5- 10) years. I'm looking for options as far as tracking anddisplaying...
4
by: Middletree | last post by:
I have asked this here before, but am still trying to decide what's best, and would appreciate the input of seasoned Asp developers. It's an ASP-built Intranet app, so I can't show you the site,...
4
by: tagg3rx | last post by:
Hi all, hoping someone can point me towards a version tracking system for .net development. My projects are starting to get kind of large and my bosses want me to implement some form of version...
2
by: sparks | last post by:
At first they just wanted to keep a record of who logged in and when. Then it was if they made changes. Now its who changed what. BUT since this made no since to them. WHO put it in and who...
4
by: sharsy | last post by:
Hello, I have setup an Access Database which about 7 people can enter data into. We have had a few problems where a 'fairy' has mysteriously been changing data in the table that they're not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.