Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculated Grid Column
Message
From
21/10/2002 10:14:19
 
 
To
21/10/2002 10:10:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00713500
Message ID:
00713503
Views:
25
Put a controlsource of Price * Quantity which will stay updated as needed.

BOb


>I have a need to include a calculated field in a grid.
>I have a price field assigned as control source to 1 column, a quantity field assigned as control source to another field and I wish to have a totals column which is, of course, the product of the price and quantity fields.
>
>I am leaning in the direction of having a field in the file called LINETOTAL where I will calculate the product of price and quantity and actually put that value into the field. Then simply assign the field LINETOTAL to the control source of the column.
>
>However, as I allow the user to change the quantity and price within the grid, this will necesitate updating the LINETOTAL field each time and then refreshing the column/grid. So, I am wondering if I am approaching this correctly or if there is a more efficient method of dealing with this.
>
>Oh, yes ... I also will need to display a GRAND TOTAL of all records on the form directly below the column with these LINETOTALs showing.
>
>Any ideas is appreciated.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform