Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total of a column from grid
Message
From
07/11/2000 10:35:35
 
 
To
07/11/2000 07:27:25
Sammy Derban
Ghana Telecom
Accra, Ghana
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00438706
Message ID:
00438776
Views:
17
Sammy,

As Vlad mentioned, if your cursor is buffered, you should use SUM. Beware that this moves the record pointer. If the cursor is not buffered, it's probably easier to do something like this:

SELECT SUM(nAmount) FROM MyCursor INTO ARRAY laTotal

IF _TALLY > 0
lnTotal = laTotal[1]
ELSE
lnTotal = 0
ENDIF

<From cursor or grid?
if cursor won't there be a conflict when a try to open and sum from cursor hhoked to grid?
if from grid how ?>>
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform