Hi,
VFP doesn't allow to update same table within trigger.
Try to place your udf to update table in table validation rules expression.
This expr will be called once record created and updated but NOT deleted.
HTH
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...