I've got an A2K form with a subform based on a query. This query has
a checkbox and an amount field and returns records if checkbox is
checked. I Dsum the amount field and display on the main form. If
the user unchecks the box, I want the corresponding amount subtracted
from the total. If they recheck the box, the amount is to be added.
I want all records to appear on the subform even after unchecking
them. This works fine...except...
I'm unable to get the total to display correctly. It appears that the
total is always 1 amount off. For example, if the total is $25,000
and amount 1 is $1000 and amount 2 is $500, then unchecking amount 1
does not requery the total. Unchecking amount 2 requeries the total
but the total displays as $24,000. The only way I can get the total
to display correctly is by requerying the subform after every checkbox
update but then only the checked records are displayed.
I use a DSum in the subform to total up the amounts...store that
result in a textbox, then display that textbox on the main form.
Any help or advice is appreciated.