Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Totaling fields in a Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00229707
Message ID:
00229759
Vues:
13
Hi, Edward:

Ok I *think* I got it.

I placed a SUM statement in the refresh() of the total field. Looking back at VFP help, I note that SUM only works in the current work area, so I had to bracket the SUM statement with SELECT and SELECT (shades of dBase III!)

This worked Ok when editing a record, but not when adding a new record it would display OK, but wouldn't update with the total of the new value. So, I also call this method from the ACTIVATE() of the FORM, which fires this off again when returning from the little form that allows the user to popuplate another line of the grid. (they don't edit the grid directly).

Now there is a little extra flipping around going on when first going into the form, but that's tolerable for the moment. I'm out of my buffering problem, and thanks to your suggestion.

But...hey, there's gotta be a better way. I note in Egger's book that he eschews grids in favor of heavily modified list boxes.

Thanks again, another mini-FoxPro crises solved. :-)

--- Larry
-- Larry Keyes
Remember only You can prevent Gray Goo. Never release nanobot assembers without replication limiting code.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform