A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help writing expression



 
 
Thread Tools Display Modes
  #1  
Old October 21st, 2004, 01:05 AM
SuMeRbOaRd
external usenet poster
 
Posts: n/a
Default Help writing expression

How do I write an expression to subtract one textbox from another textbox,
but not let its value be over +-10%? To be exact, I have 3 textboxes filled
in; [SYearBuilt] [CYearBuilt] [CImprovementValue]. I need to find out the
difference of the number in [SYearBuilt] and [CYearBuilt], then I need the
number to be lessthan or equal to 10, then devide it into 100, and then
multiply it by [CImprovementValue]. This is for making an adjustment on a
home;Age Difference, One Percent for each year, up tp 10%. Please point me
in the right direction because I'm LOST!!!!
  #2  
Old October 21st, 2004, 04:19 PM
Ted Allen
external usenet poster
 
Posts: n/a
Default

I think that you should be able to do what you want by using the iif()
function. Try:

=iif([CYearBuilt]-[SYearBuilt]10,10,[CYearBuilt]-[SYearBuilt])/100*[CImprovementValue]

I'm not completely sure I got the entire formula the way you want it, but I
think that the iif() part will enable to do what you want even if the rest is
off.

HTH, Ted Allen

"SuMeRbOaRd" wrote:

How do I write an expression to subtract one textbox from another textbox,
but not let its value be over +-10%? To be exact, I have 3 textboxes filled
in; [SYearBuilt] [CYearBuilt] [CImprovementValue]. I need to find out the
difference of the number in [SYearBuilt] and [CYearBuilt], then I need the
number to be lessthan or equal to 10, then devide it into 100, and then
multiply it by [CImprovementValue]. This is for making an adjustment on a
home;Age Difference, One Percent for each year, up tp 10%. Please point me
in the right direction because I'm LOST!!!!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
expression builder erased my expression Stefano General Discussion 1 December 6th, 2004 10:17 PM
Here's a shocker Mike Labosh General Discussion 2 October 26th, 2004 05:04 PM
Writing Criteria Expression amyfinlay Running & Setting Up Queries 1 October 15th, 2004 03:24 AM
Expression Builder Hai Le General Discussion 3 August 13th, 2004 06:06 PM


All times are GMT +1. The time now is 12:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.