Dear all, hi
I want to have a database that consists of two tables. How can I add sum of data in a field from a number of records to a field of a record related to these records in another table?
Dear all, hi
I want to have a database that consists of two tables. How can I add sum of data in a field from a number of records to a field of a record related to these records in another table?
Why would you want to duplicate the data? Explain!
Think of that I want this database for a company that sells different stuffs in different cities. I have table #1 which has one record for each stuff and table #2 which has one record for each city and stuff that has the number of the stuff sold in a city. Now I want to have a sum of the stuff sold in all the cities that I want it to be aggregated from table #2 and after that be added to the according field in table #1. Could I explain my problem?<br><br>
Are you wanting this in a query, a form or what? If the 2 tables are linked, then the data can easily be displayed. Do you have a form/subform setup?
Saving calculated data is usually a bad idea, especially aggregate data. This should be calculated when needed.
The same query is required to do derive the data for saving to table. Don't do the extra step of saving, just report the calculated data.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Actually I want to have a calculated field in table #1 that gets the data from the related records of table #2.
That is not possible. The Calculated type field is not capable of this. This must be done in query. That's what queries are for - data manipulation.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.