Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best practice – Form Calculations
Message
 
 
To
01/05/2005 03:03:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01009973
Message ID:
01010039
Views:
25
Mike,

Tore showed you one way to do that. There's another one.

1. Add a methos Calculateit to the form and put all calculation code in it.
2. In each textbox Valid() or LostFocus() event put call to it Thisform.Calculateit().
3. Add Thisform.Calculateit() to the init of the form so calculation are done on the data, I presume, you have prefilled when form started. .

>How do you experts implement form calculations? What I mean by this is, a form has several numeric fields and I want to make calculations based on these fields and display the results on the form, updating the results every time there is a change.
>
>When the form is displayed, it should calculate and display the results. When there are any changes in the numeric fields it should recalculate and display the results.
>
>In that I am not much of a programmer, the more specific the answer the better.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform