|
-
Jul 16th, 2002, 06:38 PM
#1
Thread Starter
New Member
trigger or flag when something has changed?
Hi,
is there a trigger or a flag that can be raised when anything on a form as changed.
I know I could set a boolean at false on the form_load, and on all individual textchanged and selecteditemchanged, set the boolean at true and when the user closes the form, a pop-up ask "are you sure you don't wanna save before closing?"
any other idea more easy if there are???
seb
-
Jul 17th, 2002, 02:04 AM
#2
You could try to give them all the same event handler. That way you would need only one sub routine for it.
-
Jul 17th, 2002, 09:26 PM
#3
Thread Starter
New Member
what king of Code I don't want
Hi,
of course some of them will be grouped into 1 sub.
but the problem is that some of those textbox have already their 'textchanged' used... and what I want to prevent is to do is something like this:
sub form_load
dim Test as boolean = false
blablabla
end sub form_load
sub textboxes_textchanged .... handles 'all the textboxes'
if test=false then
test=true
end if
end sub
sub form_closed
if test=true then
dim Answer = msgbox("Do you wanna save before quitting?")
if answer = vbyes then
save()
end if
end sub
I really would like another solution for my problem please....
Sebastien Anselmo
Etiquettes RTM Labels inc.
-
Jul 17th, 2002, 10:04 PM
#4
You can load up the different 'changeable' field values into variables on the form load event. Then at the form closing event, check the values against what is on the form. If they are not the same, then you ask if they want to save them. If they are the same, that means that the user didn't change anything.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|