P
pinkfloydfan
Hi there
I am very new to using access and in writing my first database I have
now come up against a problem that I can't seem to find a solution for
by googling and am hoping that someone here can point me in the right
direction.
I am using Access 2007 to build an inventory database. The core data
table includes the following fields:
ID
Asset Value
Depreciation
Old ID
In this table, Asset Value will be either a number (if it is the first
time we see the asset) or blank if we are looking at a child record.
I would like to run a query that calculates the Asset Value for all
the records at the end of the period along the lines of the following:
i) If IsNumber(Asset Value) then EndOfPeriod AssetValue = AssetValue -
Depreciation
ii) Else, EndOfPeriod AssetValue = EndofPeriod AssetValue (where ID =
OldID) - Depreciation.
The result should show a table of EndofPeriod AssetValues that are
getting smaller and smaller. For example, if there are 3 records only
in the table (parent, child and grandchild), the Asset Value for the
parent is 100 and there is Depreciation of 20 at each record, then the
EndofPeriod AssetValue at each stage would report 80, 60 & 40.
Is there a way to do this please?
Many Thanks
Lloyd
I am very new to using access and in writing my first database I have
now come up against a problem that I can't seem to find a solution for
by googling and am hoping that someone here can point me in the right
direction.
I am using Access 2007 to build an inventory database. The core data
table includes the following fields:
ID
Asset Value
Depreciation
Old ID
In this table, Asset Value will be either a number (if it is the first
time we see the asset) or blank if we are looking at a child record.
I would like to run a query that calculates the Asset Value for all
the records at the end of the period along the lines of the following:
i) If IsNumber(Asset Value) then EndOfPeriod AssetValue = AssetValue -
Depreciation
ii) Else, EndOfPeriod AssetValue = EndofPeriod AssetValue (where ID =
OldID) - Depreciation.
The result should show a table of EndofPeriod AssetValues that are
getting smaller and smaller. For example, if there are 3 records only
in the table (parent, child and grandchild), the Asset Value for the
parent is 100 and there is Depreciation of 20 at each record, then the
EndofPeriod AssetValue at each stage would report 80, 60 & 40.
Is there a way to do this please?
Many Thanks
Lloyd