>I have a form with many many fields. I use table buffering and tableupdate to commit the changes if a field value has been changed. Using getfldstate() I can determine if a field has had activity I need to determine which field has changed and the previous and new values are for use later.
>
>I am thinking of storing the old value in a form property from gotfocus() and new value in another form property from lostfocus() and then compare the results and storing in a table.
>
>I am looking for a more elegant way to do this without manually creating all those form properties.
>
>Thanks in advance for any suggestions.
>Gaylen
GetFldState() will tell you whether a field or fields has / have changed - even if it reverts to its old value.
OldVal("MyField") will give you the value before the modification.
CurVal("MyField") will fetch the value from disk again (this is in case another user made a change).
Usually, you would compare MyField with OldVal("MyField"). For instance, I use this in triggers, to update another table.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)