Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Sum to textbox
Message
 
 
To
18/11/2000 12:00:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00443370
Message ID:
00443392
Views:
17
>Hi Gang,
>I have a grid on a form, that I'd like to display
>the sum of a field into a text box on the form
>but outside of the grid. This form has a two table
>ENV. Customer and product. The Customer is the parent
>table, and the product is the child table. The upper
>part of my form handles Customer information, the
>grid (child) displays the product information. What
>I'd like it to do, is display the sum amount of a price
>field into a textbox, and be able to refresh whenever
>I change or update a record.
>
>Can I get any help ?
>
>John


John,

You might try this approach, which avoids moving the record pointer in the grid's underlying table:

SELECT SUM(yPrice) ;
FROM (gridrowsource) ;
INTO ARRAY laTotal

ThisForm.txtTotalPrice.Value = laTotal[1]
"Problems cannot be solved at the same level of awareness that created them." - Albert Einstein

Bruce Allen
NTX Data
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform