"Denise" <(E-Mail Removed)> schrieb
> I want to fire code when the user changes the value of a textbox. I
> only want it to fire when the user is finished eding the TextBox and
> leaves (not after each keystroke). I am using the Validating event
> (the Leave even seems similar), but this is called even when the user
> does not make a change. Is there a simple way to handle this other
> than manually setting boolean flags for each keystroke?
>
> I also find that the Validating event is begin called even when I do
> a 'CancelUpdate' to undo the changes - I do not want this to happen.
> Again, is there a simple solution? Didn't older version of VB have
> an IsDirty function? Is there something similar?
Store the values you want to edit in a data layer (in variables, in an
object). If you leave a textbox, compare the value in the textbox to the
corresponding one in the data layer. You can validate it in the Validating
event, and, if ok, store the new value in the data layer.
--
Armin
How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html