Sergey,
The field he wants to sum has repeating data, he only wants to pick up the value one time per group...maybe _vfp.setvar() could help out here.
>Hi Jeff,
>
>I'm confused. How did you get 4 in your example? Dou you mean Count instead of Sum?
>
>>Sergey,
>>
>>That seems to total all of field1. An example is:
>>
>>field1-field2
>>1-222
>>1-222
>>3-222
>>3-222
>>----
>>4 total
>>
>>I do have a group on field2 but the field1 total with sum selected is 8.
>>
>>Jeff
Steve Gibson