Tags: access, asset, assets, attempting, book, built, calculate, calculating, database, depreciation, line, microsoft, mysql, oracle, query, sql, strait, total, value

Calculating Strait Line Depreciation

On Database » Microsoft Access

2,631 words with 2 Comments; publish: Wed, 02 Jan 2008 18:50:00 GMT; (250140.63, « »)

I am attempting to calculate the book value of assets in a query.

I calculate total depreciation of the asset using the built in Strait Line

Depreciation function and then use the following statement to calculate

BookValue: BookValue: [PurchasePrice]-[AccumulatedDepreciation] which

works fine.

The problem that I have is that when the asset's book value goes negative,

the value in the query

doesn't stop at zero.

Is there a way to prevent the value in a calculated query field from going

negative?

I'm not especially concerned that the query result remains at zero as much

as I am that the report

that is based on the query remains at zero.

Thanks much for any assist anyone could send my way.

All Comments

Leave a comment...

  • 2 Comments
    • On Tue, 17 Jan 2006 00:11:13 GMT, "blagdam" <blagdam.ms-access.questionfor.info.mindspring.com> wrote:

      >I am attempting to calculate the book value of assets in a query.

      >I calculate total depreciation of the asset using the built in Strait Line

      >Depreciation function and then use the following statement to calculate

      >BookValue: BookValue: [PurchasePrice]-[AccumulatedDepreciation] which

      >works fine.

      >The problem that I have is that when the asset's book value goes negative,

      >the value in the query

      >doesn't stop at zero.

      >Is there a way to prevent the value in a calculated query field from going

      >negative?

      >I'm not especially concerned that the query result remains at zero as much

      >as I am that the report

      >that is based on the query remains at zero.

      >Thanks much for any assist anyone could send my way.

      BookValue:IIF(([PurchasePrice]-[AccumulatedDepreciation])<0,0,[PurchasePrice]-[AccumulatedDepreciation])

      Wayne Gillespie

      Gosford NSW Australia

      #1; Wed, 02 Jan 2008 18:51:00 GMT
    • Wayne Gillespie <bestfit.ms-access.questionfor.info.NOhotmailSPAM.com.au> wrote in

      news:hufos15m6ott7ev199sm77an7up2ffakuv.ms-access.questionfor.info.4ax.com:

      > On Tue, 17 Jan 2006 00:11:13 GMT, "blagdam"

      > <blagdam.ms-access.questionfor.info.mindspring.com> wrote:

      >>following statement to calculate BookValue: BookValue:

      >>[PurchasePrice]-[AccumulatedDepreciation] which works fine.

      >>The problem that I have is that when the asset's book value

      >>goes negative, the value in the query

      >>doesn't stop at zero.

      > BookValue:IIF(([PurchasePrice]-[AccumulatedDepreciation])<0,0,[

      > PurchasePrice]-[AccumulatedDepreciation])

      Or, IIF([PurchasePrice]<[AccumulatedDepreciation],0, ...

      which will execute a little faster.

      --

      Bob Quintal

      PA is y I've altered my email address.

      #2; Wed, 02 Jan 2008 18:52:00 GMT