Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total value for grid column?
Message
From
14/09/1999 21:13:36
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00264763
Message ID:
00264768
Views:
17
>Apprentice programmer doing journeyman task has need of a mentor....
>
>How can I total the values in a grid column to a textbox on the form?
>
>I have an order entry form with a grid. The last column is the extension (quantity * price). Below the grid I want a subtotal textbox to display the sum of the extension column.
>
>This has to be a very common situation, but I haven't found any examples or discussions of the process anywhere.
>
>I would greatly appreciate any explantions, examples or directions to articles describing what I need to do.
>
>Thank You,
>Neil Preston

Grid has recordsource and you task is actually counting values within this cursor or table, e.g. you may have some form.getttoal method:
Select SUM(qty*price) from mycursor into array myarray
Thisform.Mytextbox.value=myarray[1]
and call this method from any places where user may change either qty or price: e.g. Grid.Column.txtQty.InteractiveChange event
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform