D
David F
I have a subform with several records displayed in datasheet view. As the
user inserts a value in the "amount" field in the subform, I need the
cummulative total (sum) for all the related "amount" fields to display in a
textbox on the parent form.
Can anyone give me some guidance on how to code this?
I can write to the parent form using the AfterUpdate event of the "amount"
field in the subform like:
Form_parentformname.amount.Value = 10
But I am not sure how to _sum_ the "amount" field for the all the records
showing the in subform.
The SQL would look something like this: SELECT sum(amount) FROM orders WHERE
id=linkedfieldid.
But how can I get this value from within a VB module?
user inserts a value in the "amount" field in the subform, I need the
cummulative total (sum) for all the related "amount" fields to display in a
textbox on the parent form.
Can anyone give me some guidance on how to code this?
I can write to the parent form using the AfterUpdate event of the "amount"
field in the subform like:
Form_parentformname.amount.Value = 10
But I am not sure how to _sum_ the "amount" field for the all the records
showing the in subform.
The SQL would look something like this: SELECT sum(amount) FROM orders WHERE
id=linkedfieldid.
But how can I get this value from within a VB module?