dilipk.pandey
15th March 2007, 07:14
Dear Seniors,
I have a maintain session where I am displaying some records after filtering based on certain parameters...Its returning more than one records (lets say 10 records...) below, where one of those fields being displayed is an Amount field. Now, I have to display the sum this Amount of all the selected rows on a Form Display Field.As the user mark the rows or unmark the rows, the amount in that display field must get added or subtracted. I tried to do this using the below code but its not giving the desired result:
choice.mark.occur:
after.choice:
for i=1 to filled.occ
if mark.table(i) then
sel_inv_amt = sel_inv_amt + tfacp200.amth(1)
iamt = sel_inv_amt
endif
endfor
____________
Suppose user selected 5 rows, then the control flows to the after.choice each time, 1st time it assigned the first record(amount) to Display Field, but next time its adding the last selected row for "i" time, and also if user unmark/unselect any row its not updating the values in display field.
Please help me out, and do ask me if more clarification is required.
Thanks in advance.
Dilip.
I have a maintain session where I am displaying some records after filtering based on certain parameters...Its returning more than one records (lets say 10 records...) below, where one of those fields being displayed is an Amount field. Now, I have to display the sum this Amount of all the selected rows on a Form Display Field.As the user mark the rows or unmark the rows, the amount in that display field must get added or subtracted. I tried to do this using the below code but its not giving the desired result:
choice.mark.occur:
after.choice:
for i=1 to filled.occ
if mark.table(i) then
sel_inv_amt = sel_inv_amt + tfacp200.amth(1)
iamt = sel_inv_amt
endif
endfor
____________
Suppose user selected 5 rows, then the control flows to the after.choice each time, 1st time it assigned the first record(amount) to Display Field, but next time its adding the last selected row for "i" time, and also if user unmark/unselect any row its not updating the values in display field.
Please help me out, and do ask me if more clarification is required.
Thanks in advance.
Dilip.