Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate the total.
Message
De
22/02/2001 14:50:45
 
 
À
22/02/2001 10:11:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00478403
Message ID:
00478576
Vues:
25
>Hello all.
>I have a grid in one of the columns this has severals valors I want put in a text box control the total the value of each cell.

This depends on what you want to sum. If you have, say, 3 numeric columns for which you want to create a fourth column that is the sum of the other three, you can use a SELECT statement like:
SELECT fld1, fld2, fld3, fld1 + fld2 + fld3 AS MySum ...
to get a sum of the columns for each row. This requires creating a cursor from the SELECT and binding the cursor to the grid.

If you want to sum all the rows of a particular column, you can use something like:
CALCULATE SUM(fld1) TO MySum
then display the result in a text box, then update the value on-the-fly if modifications are made.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform