Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
 To: Badita Alexandru-Stefan
  Where is Badita Alexandru-Stefan?
 Bucharest
 Romania
 Badita Alexandru-Stefan
 Tags
Subject: RE: SUM PROBLEM
Thread ID: 78900 Message ID: 78901 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Monday, October 10, 2005 8:55:14 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!


Before your SUM command save the current record number and reposition the record pointer back there afterwards:
if EOF()
   lnOldRec = 0
else
   lnOldRec = recno()
endif
SUM....
if lnOldRec <> 0
   GOTO lnOldRec
endif


-BP
www.peisch.com

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