>I have a form where one user updates data. After I have evaluated, with getfldstate(), i found that the field had changed, i want to use de old value
>to substract this old value and add the new value.
I think you should use oldval() in this case.
oldval() gets the value from the buffer, before doing the change.
curval() is used to get the value currently saved on disk: it is fetched from disk again. This can be different from oldval(), only if another user (or another form, or another copy of the application) made changes in the meantime. However, this should normally be detected as a conflict; for safety (for data integrity), the user should not be allowed to save in the case of a conflict.
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)