473,396 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calculating Strait Line Depreciation

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.
Jan 17 '06 #1
2 5641
On Tue, 17 Jan 2006 00:11:13 GMT, "blagdam" <bl*****@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
Jan 17 '06 #2
Wayne Gillespie <be*****@NOhotmailSPAM.com.au> wrote in
news:hu********************************@4ax.com:
On Tue, 17 Jan 2006 00:11:13 GMT, "blagdam"
<bl*****@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.
Jan 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ricky Romaya | last post by:
Hi, I'm working on a file upload script. I need to calculate the CRC32 of the file(s) which are successfully uploaded. How can I do this? PHP only have CRC32 function for strings. However, the...
5
by: Ron Adam | last post by:
Hi, I'm having fun learning Python and want to say thanks to everyone here for a great programming language. Below is my first Python program (not my first program) and I'd apreciate any...
0
by: Kasp | last post by:
Hi there, I am trying to make an OLAP cube on a table having two columns (datetime, Number_of_times_an_event_occured). My dimension is time and I want to measure the Min and Max times an event...
25
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to...
0
by: peterleeds | last post by:
Could anyone explain why Access 2003 is continuously calculating a continuous form, when it works perfectly in previous versions? On reading previous messages I gather that overlapping controls...
2
by: celsius | last post by:
Hi folks, Al Bowers wrote this program on comp.lang.c Date: 2001-07-09 13:41:58 PST #include <stdio.h> int isleap (unsigned yr); static unsigned months_to_days (unsigned month); static long...
2
by: nejmay | last post by:
Help Please, I am taking a beginners VB.NET class and my next assignment making a Depreciation Calculator. I am suppose to use the built in functions SLN() and SYD() to perform the calus, option...
12
by: jUrner | last post by:
Hello all I have the problem of how to calculate the resolution of the system clock. Its now two days of head sratching and still there is nothing more than these few lines on my huge white...
2
by: bossenb6 | last post by:
I have an assignment to calculate depreciation using straight line, double declining balance and sum of the years digits. Heres what I have so far, but I can't seem to figure it out. Please help!! ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.