yes, sounds like you almost all the raw data you need to calculate
depreciation. if you want to be able to calculate "the dollar amount
depreciated *to date* for a particular asset", you need one more thing - the
date depreciation starts, which i assume would be the date each asset was
purchased or otherwise acquired? i think that would pretty much have to hard
data, for each asset record.
the easiest way to write a calculation once, that you can use over and over
again, pretty much anywhere in the database, is to write a public function
that returns the calculated values. something like
Public Function isDepreciation(ByVal curOrig As Currency, _
ByVal lngLife As Long, ByVal datAcquired As Date) As Currency
'curOrig is the original value, lngLife is the depreciable life,
'datAcquired is the date acquired or purchased.
'inside this function, you write the calculation.
Dim intMonths As Integer
intMonths = DateDiff("m", datAcquired, Date)
'the following line will convert a "depreciable life" value of years into
months;
'if your "depreciable life" data is already expressed in months,
'you don't need this line of code.
lngLife = lngLife * 12
isDepreciation = (curOrig / lngLife) * intMonths
End Function
create a new Module in Access, from the Modules tab in the database window,
paste this function into it, and save the module. you can call the function
from within a query, a form, a report, or another VBA procedure - wherever
you need to return the current depreciation value of an asset.
hth