Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid and Total
Message
De
14/08/1997 19:47:04
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
À
14/08/1997 12:36:17
Shane Gilbert
Oklahoma State Department of Education
Norman, Oklahoma, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00044671
Message ID:
00044813
Vues:
33
>I have a form that I am trying to reproduce in VFP 3.0. This form contains parent fields and a grid populated with related child records. The related child records have the following structure:
>
>claimPeriod
>totalMeals
>category
>rate
>claimAmount
>
>THere are 3 categories for each claimPeriod( free, reduced, paid). Each ADD to the tableinserts 3 records, one for each category. All of this works fine. However, There is a netAmount textbox on the form that needs to totalthe 3 claimAmounts for each claimPeriod. This textbox needs to be updated whenever the grid is scrolled so that it shows the appropriate netAmount for the group of 3 categories associated with the claim period. The grid on the form shows 4 claimPeriods(totalling 12 records-3 for each claimperiod) with a textbox for a netAmount for each of the 4 claimperiods. I cannot come up with a way to do this. Any suggestions would be greatly appreciated.

How about adding a method to the afterrowcolchangeevent grid method? Something like...

SELE SUM(ClaimAmount) AS NetAmount FROM yourdbf FOR claimperiod=thisform.gridname.cliamperiodcolumnname.text1.value INTO QUERY
netAmount.value=query.NetAmount
USE IN QUERY
=thisform.NetAmount.Refresh()
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform