Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculations on a Form(Similar Thread # 129868 Mess #129
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00133745
Message ID:
00134094
Vues:
10
Assuming that the method CalcTotal is a method of your form, that all of the controls (IntCost, ExtCost, and Labour) are directly on the form (not in a page frame or any other container within the form), and that the textbox that shows the total is called TotalCost, your CalcTotal method could look like this:
THIS.TotalCost.Value=THIS.IntCost.Value+THIS.ExtCost.Value+THIS.Labour.Value
THIS.TotalCost.Refresh()
You can call the method from one of the controls on the form using THISFORM.CalcTotal().

>This application that I am developing now was an old dBase III app and the user want the total displayed. The TotalCost is the sum of the IntCost, ExtCost and Labour. If the method to calculate TotalCost is called CalcTotal, can you please give me the THIS... with the above names as I am not sure whether I understand it correctly.
>
>Thanks
>
>Petrus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform