>In a text box on a form I am trying to put code in the valid event to prompt the user that if this field value changes then another field value will change so in the valid event I put "IF OLDVAL("{fieldname}","{tablename}") !=this.value
>" then prompt user of additional change. This works fine until the user clicks into the same field a second time does not change the value and gets the same message, which I am trying to prevent. I am using Optimistic row buffering so unless I commit my changes on the initial change, which I don't want to do, I continuously get the prompt for the change in value of the field. Any ideas?
>
>Thanks for your help!
>Stephen J. Hunt
I usually use the following technique: in the TextBox.GotFocus I set this.OldValue = this.value and then you can check it in valid instead of OldVal(). You would need to add property OldValue to your textbox class.
If it's not broken, fix it until it is.
My Blog