Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculations on a Form(Similar Thread # 129868 Mess #129
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00133745
Message ID:
00134094
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform