Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using TAG property to store previous value???
Message
From
17/08/1999 23:55:46
Chris Crachiolo
Blackmoor Associates Incorporated
New York City, New York, United States
 
 
To
17/08/1999 23:35:05
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00254793
Message ID:
00254804
Views:
38
>I need to know what the previous value was in a field for processing and comparison routines. I assume I can use the TAG property to store the value before entry (using the GOTFOCUS method) and check it in before exiting (LOSTFOCUS). Is that the recommended way?

Usually the WHEN and VALID methods are used, respectively, for this purpose. Using the VALID method has the advantage of being able to return .F. if the validation tests aren't passed, so that the control can't lose the focus until the data passes validation.

>I also noticed that the TAG property is usually text... if I am storing a value, such as a dollar amount, do I need to use the STR & VAL routines to convert it or is there a way to get the TAG to be something other than text?

Yep, the TAG property is always text. You could use conversion functions as you said, but I find it's easier to simply add a property to the form or formset -- usually I just call it "PrevVal" and use it wherever I need to temporarily store a previous numeric value for comparison.
"Ignorance more frequently begets confidence than does knowledge."
-- Charles Darwin
"I am invincible! Invincible...OWWWWWWWW!"
-- Homer Simpson
Previous
Reply
Map
View

Click here to load this message in the networking platform