RE: difference between SETAUTOCALCFIELD and CALCFIELD
Calcfield only calculates the flowfield for current record.
SetAutoCalcfield calculates the flowfield for all records that you retrieve. When you call SetAutoCalcfield before you retrieve the records, then when you use find and next, the flowfield values are automatically calculated. Using SetAutoCalcField is better performance than calling Calcfield in a loop.
------------
Calcfield Example:
if Rec.FindSet() then
repeat
Rec.CalcFields(Balance);
//Do Something
until Rec.Next() = 0;
------------
SetAutoCalcfield Example:
Rec.SetAutoCalcfield(Balance);
if Rec.FindSet() then
repeat
//Do Something
until Rec.Next() = 0;