Hi - i have:
main_form
sub_form_a which is linked to main_form (many to one)
sub_form_b which is linked to sub_form_b (many to one)
sub_form_b has a field called 'amount'
I put an unbound field called 'sum_Amount_b' in the footer of sub_form_b to capture the sum of 'amount'. Works fine.
I put an unbound field on sub_form_a call 'sum_Amount_from_B' which is equal to 'sum_Amount_b'. Works fine.
I tried putting an unbound field called 'sum_Amount_A' in the footer of sub_form_a which summed up 'sum_Amount_from_B'. That didn't work and I understand now that you can't sum up an unbound field.
The last part of my plan had been to put an unbound field on main_form called 'sum_amount_total' which was supposed to equal to 'sum_Amount_A', but of course that didn't work cause the step above didn't work.
My next try was to add a bound field to sub_form_a's data source. Let's call that 'bound_sum_a'. I thought that once I had a bound field reflecting the correct value, then updating the main form would be easy. I tried lots of different ways to do this, but with no luck as yet.
So the broad question is how do I get my unbound field on the main_form (sub_amount_total) to reflect a grand total of all the amounts from both the sub forms.
The more detailed question (if I'm on the right track) is how to get the bound field (bound_sum_a) to equal the total of the amounts from sub_form_b. And to have this happend as people are making changes to the data (changing amounts, adding or deleting records). I've tried a variety of after_updates, after_inserts, etc. using refresh, requery on various objects. Not only have I not hit on the right combination, but each of the refresh, requeries cause me to lose focus which is an undesirable outcome.
Sorry for the long windedness, but I wanted to be thorough. Have been at this for several hours now and need some expert advise desparately. I really appreciate you reviewing this.