Automatic total sum from child form to main form

eyalco

Registered User.
Local time
Today, 00:21
Joined
Jul 24, 2007
Messages
50
I need to store a "calculation" which involves values from child records - it is a receipt storing totals from the receipt details.
The record is bound and I need it to update it's totals when each item in receipt is inserted.
I guess I'm looking for a form event which will operate (the after update is not good).

Thanks.
 
It's not generally advisable to store a calculation on child records, since in doing so you design in a dependency that anytime and anywhere a record is changed, added or deleted you have to remember to update some dependent value.
Rather, on a main form you can bind the value of a textbox to something like this...
Code:
=DSum('SumField', 'YourTable', <filtered for the record ID in the main form>)
 

Users who are viewing this thread

Back
Top Bottom