Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding last entered value in valid event, how to?
Message
From
08/06/2008 09:36:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
08/06/2008 01:16:50
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01322235
Message ID:
01322363
Views:
15
>I don't need a list of all entered values but only the last entered value. (Please see my reply to Sergey Berezniker). It seems to be easy, I was thinking it the same way as you. But I later found that, it is not only "save" that matters (to clear the last value I have stored to a property of the input control, say a textbox). Imagine, my entry form allow user to navigate through records with a [Next] and [Previous] button. User might give up saving a rec when moving to the next, in this case, still whatever "last entered value" stored has to be cleared.
>
>I was once try to store the "last value" in gotfocus event, but then later reliaze gotfocus has several different triggers other than the normal user click the control or tab to the control. E.g. when new value is picked from a picklist, the gotfocus will be fired when returned from the picklist. So new value picked become "last entered value"...
>
>I got this feeling, if the mechanism that I develop to store "last entered value" is free from form or its input control, rather it is underlying source field dependent, then it will be a perfect solution... unfortunately, I find that beyond my capability, that is why, my best dream is VFP already has this feature :)

VFE framework has an .OkToMove() method, which checks for GETFLDSTATE(), and is invoked before any attempt to move off the current record. That's where I'd put the code to lose the previous values.

But if you need only the original value, i.e. the value of the record as it was before editing, why not use oldval()?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform