General information
Category:
Forms & Form designer
Hello Thanya
A simple technique I sometimes use.
Place a textbox named MyTotal on your form for a use as a total.
In its refresh method place something similar to the following
SELECT (your_table)
CALCULATE SUM (EVAL(your_field) ) to this.value
now whenever you refresh your total field with MyTotal.refresh it will contain the total you want.
you may want to place mytotal,refresh in an event of your grid so this total gets updated whenever you alter some value in your grid.
beforecolumnchange is sometimes a good place to do this. Or you could choose an event attached to the object that is being altered.
Good Luck
> I am working on a parent-child form. The children records are displayed on the grid. The 3rd column of this grid is the item costs and I have to total this column. I would like to display the total cost on the form(but not on the grid)and add total to a field in parent table. Have tried this code without results. can you help ?
>
>update sovereign &&parent table
>set sov_cost = sov_cost(SUM(content_cost)from sov_contents, sovereign)where sovereign.sov_id = sov_contents.sov_id
>
> Thank you in advance.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only