>>>No but you can build such functionality into your control base class by adding a 'Lastvalue' property and populate it at appropriate time.
>>
>>Thanks!
>>Hard to believe VFP does not have this feature... anyway, I trust you :)
>
>I don't think that it is a common reqirement in applications.
Isn't inter-dependent input fileds is quite a common scenario?
E.g. I have several fields B, C and D whose valid value or valid range of values are field A dependent. Whenever user change field A value, I will need to determine whether to wipe the B, C and D's value (so that user will input again their valid values which now base on the new A). I want the wipe to be real smart that it is only done when necessary... comparing using OldVal() does not help if there are more than 1 time changes of A value before save:
Form load:
A = A1, B = B1, C = C1 and D = D1
User change 1: (The valid event of A wipes B, C and D, so force a re-enter of their values)
A to A2, then B = B2, C = C2 and D = D2
User change 2:
Click A, key in A3 for A, then change his/her mind, change A3 back to A2 and hit [Enter] to move on.
or
When picklist is involved, pick A3 for A, change his/her mind, pick A2 again for A and hit [Enter] to move on.
For "User change 1", the wipe can be determined correctly using oldval(), but for "User change 2", I will need a last entered value, with it (for the above example quoted) I can determine that the wipe should be skipped because user has not changed A.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only