Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Badita Alexandru-Stefan
  Where is Badita Alexandru-Stefan?
 Bucharest
 Romania
 Badita Alexandru-Stefan
 Tags
Subject: RE: SUM PROBLEM
Thread ID: 78900 Message ID: 78906 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Monday, October 10, 2005 9:42:15 PM         
   


> I have a sum ... for ... to variable line in my program,
> and it positiones me at the bottom of the table and can not navigate in grid does anyone have a workaround for this situation?
>
> I dig VFP!
> All greate things come to those who wait , and they come from above!




In addition to Barbara, you could use SELECT-SQL
SELECT SUM(MyField) FROM MyTable INTO ARRAY aSumArray
m.mySumVariable = IIF(_TALLY==0,0,aSumArray[1])

That way you not move the record pointer in the MyTable

ENTIRE THREAD

SUM PROBLEM Posted by Badita Alexandru @ 10/10/2005 8:43:26 PM
RE: SUM PROBLEM Posted by Barbara Peisch @ 10/10/2005 8:55:14 PM
RE: SUM PROBLEM Posted by Borislav Borissov @ 10/10/2005 9:42:15 PM