|
Question : Sum data in multiple fields and store number in another field
|
|
I am trying to sum the data in multiple fields; d01, d02, d03....d31. I need to sum them per record and place the sum in another field [Aug07]. I want (or need) to do this by VBA code so when I press a button it will sum and put the numbers in the [Aug07] field w/o stopping until it gets all records.
Example: PO D01 D02 D03 D04 ...... Aug07 PO123RT 10 3 7 25 45
|
|
Answer : Sum data in multiple fields and store number in another field
|
|
Its not recommended to store calculated fields into tables (you can calculate as necessary).
If you must, you can do an update query to add them up for you, it'll be much faster than using recordsets.
"UPDATE [Name Of Table] SET [AUG07] = [d1]+[d2]+[d3]+[d4]"
Then just run the query as necessary.
|
|
|