sum of all the dynamic fields in query

MeU&Us

Registered User.
Local time
Today, 17:53
Joined
Dec 28, 2008
Messages
31
Hi!
i have a query having ID(auto number) field, Name(text) field, and many other field having field property of (Currency)
now what i want to do, is to sum all the fields having Data type of (currency).
the problem is that Currency Type fields are added every month, and i want them added automatically in the sum value (sum of all (Currency) fields)
i already have the code to add currency type fields to the table
i simply want a code or something to run in access 2007 to add all these field, and update itself when there is a new field inserted in the table on which the query is based(it adds that field too)
in other words, a code or sql statement etc to sum all those fields in the query which have Currency data type
thanks!
 
Last edited:
well Uncle Gizmo!
my database is like, that i have to store each Quarter`s record separately, and then i want the sum of all those values to use in different report.
 
so Uncle Gizmo
are u suggesting any better way to do my job
here is the thing!
i have a relational database and my database is related to calculating the depreciation on fixed assets
now there are two things
1- depreciation for the year\half year
2- addition af all the previous depreciations to calculate accumulated depreciation.
what i am doing right now is having a complex query to calculate depreciation for the current year.
now i want to calculate the accumulated depreciation by adding all the previous years depreciation based on those current year`s depreciations calculated in previous years
and one more thing, i have hundreds of assets, and the depreciation is to be calculated for each of them
so can u suggest any better idea to tackle this?
regards
 
well appreciated UG

but this suggestion seems impracticable for me, because like your sample transpose database, i do not have such fields like names, etc.
i have calculated financial amounts and figures, which need to be stored permanently.
so any one please help me in this regard
thanks
 
I agree with Gizmo. It is a bad idea to add fields.

One way you could get the work done is to have a date field and then you can group by the month, quarter or anything else that you need without having an endless amount of new fields.

Hope this helps.

Art
 

Users who are viewing this thread

Back
Top Bottom