>Dear all,
>
>In my account program, a grid holds the voucher contents with a local view - grdvdetail (say), on the form, I utillize a [OK] commanbutton to update the final editng to the voucher contents with a code statement :
>
>select grdvdetail
>tableupdate(.t.)
>
>On the foot of the form, I utilize a set of textboxs which calculate the total debit amount, total credit amount and total balance by using another view which coding as
>
>select sum(vdebit) as tdebit, sum(vcredit) as tcredit from grdvdetail into cursor tsum
>
>How can refesh the total debit amount, total credit amount, and the total balance, before I click th e [OK] button to tableupdate the view grdvdetail??
>as I edit the debit amount and the credit amount in the grid columns.
>
>
>With regards,
>
>Ransome
Instead of SELECT SQL use SUM command (See SUM, CALCULATE commands in Help).
If it's not broken, fix it until it is.
My Blog