PaulK
Posts: 15
|
Posted: 04/27/2006, 12:33 PM |
|
Hi
Im trying to find a way of being able to calculate a value of a field within a grid. Basicaly i have an editable grid that allows the user to enter a price and a quantity, i want the system to automatically calculate the total for the items eg quantity * cost and then put the calculation within a total field. Here is an example of the editable grid..
http://www.tfis.org/example.jpg
I presume you can do it using javascript however im not sure how to do it. Because there are mutlple rows, im not sure how to control the fields, i presume its some sort of array or something :). Anyway i was wondering if someone could point me in the right direction
Thanks for any help
Paul
|
|
|
PaulK
Posts: 15
|
Posted: 04/27/2006, 1:24 PM |
|
Just got a work around working just now,
Basically adding the following into the SQL Select query...
sum(unitCost * quantity) as totalCosts
and using the field to use the totalCosts as the control source, is working fine to display the grid, however i would still like to know how i could do it on the live form using java (i presume).
|
|
|
|