Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I know when a textbox value has been changed?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00304787
Message ID:
00304802
Views:
21
>>I have a textbox on a form, bound to a data field. I want to know, when the user exits the field, whether or not they changed the value of the textbox. I want to compare the new value to the previous value, NOT to the value of the field in the table, because the user may change the textbox several times while still in the screen.
>>
>>What's the best way to do this?
>>
>>Thanks!
>
>Hi Elyse,
>
>Look at the InteractiveChange event in the help file.

Hi George,

What about using GotFocus / LostFocus. Add a custom property to the textbox called OldVal. In GotFocus you could do this.OldVal = this.value. Then in LostFocus do:
if this.value == this.OldVal
    ** No change
else
    ** User Changed value
endif
That way you're not testing on every keystroke.

hth
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform