Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A codding problem
Message
 
To
21/11/2002 02:10:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00725057
Message ID:
00729191
Views:
15
Use the lost focusevent of the 4 input textboxes to write the sum to textbox five. Create a procedure (in a PRG) or a method on the form.

In each TextBox Lostfocus area enter this code:
AddTextBoxesToTotal(thisform)
procedure AddTextBoxesToTotal(oform)
with oform
.txtMyTextBox5.Value=(.txtMyTextBox1.Value+.txtMyTextBox2.Value;
                    +.txtMyTextBox3.Value+.txtMyTextBox4.Value)/4
endwith &&oform
endproc
>I know its a to much of a newbie Q, but what can I do Im new in VFP
>
>I have a form, and what I want to do, is to add the quantity of 4 labels that the user its going to give and bya a botton have this simple operation
>(label 1+label 2+label 3+label 4)/4,
>
>the result its going to appear on a label 5, call total,
>
>But I just cant get it to work...cna anybody help out on the code please
>
>
>thanks ya'll
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform