Link to home
Create AccountLog in
Avatar of M A
M AFlag for United States of America

asked on

Total the sum from subform in access and save to master table

Calculate the sum from the subform and save that to the master table
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

What is the "master table"? Is it the parent form's recordsource?

Note that it is generally considered to be poor practice to store calculated values in a table, since that value won't be updated if the root values change. Instead, you should calculate those values on the fly as needed.

With that said, the DSum function will get that information for you. I'm not sure where or when you want to save the data, but you could do this:

Me.YourCalcedField = DSum("FieldToSum", "Table", "WhereClause")
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of M A

ASKER

It is showing the correct result. How to save these data to a field in the master table?
I have to save these values to fields in the table to show in the report
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of M A

ASKER

Thanks to both