473,326 Members | 2,061 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,326 software developers and data experts.

Maybe IIF, I don't know Round 2!!

Presto731
I would prefer to do this with an IFF statement as it would be the easiest way for me to continue with the project.

Here is what I need. in a table will be a number. based on that number three values can arrise, we will call that number x and the threshold will be y and the resulting value will be z

Here are the three resulting values

if X is less than Y, then Z will equal a calculation based on a certain value
if X is equal to Y then Z equals 0
if X is greater than Y then Z equals 50

Please help put this together in my query.

Thanks ini advance
Apr 28 '08 #1
3 1314
Stewart Ross
2,545 Expert Mod 2GB
Hi. Two IIFs nested will do what you require, replacing the placeholder {your calculation goes here} with your actual calculation:

IIF(X=Y, 0, IIF(X>Y, 50, {your calculation goes here}))

-Stewart
Apr 28 '08 #2
Hi. Two IIFs nested will do what you require, replacing the placeholder {your calculation goes here} with your actual calculation:

IIF(X=Y, 0, IIF(X>Y, 50, {your calculation goes here}))

-Stewart

that looks like what I was needing. Thank you i will try it
Apr 28 '08 #3
Thanks Stewart that was exactly what I needed!!!
Apr 29 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: joeandtel | last post by:
If I have a value that is 53.123499999, how can I round it to 53.12?
1
by: news.verizon.net | last post by:
Hi all, I have a website created by others and sort of meshed together. Here are a couple of links... http://www.ibco.net/honours/rc/ See how the navigation bars on the left come in behind this -...
6
by: Jef Driesen | last post by:
I need to implement a function to implement the rounding of floating point values. At the moment i have two different implementations, depending on the type of the return value (integer or double)....
3
by: shank | last post by:
I have the following equation. <% varWT = Round(CInt((rsFreePack.Fields.Item("Weight").Value)) + CInt(Session("w"))) %> Assume.... Round(CInt((rsFreePack.Fields.Item("Weight").Value)) = .12...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
28
by: liorm | last post by:
Hi everyone, I need to write a web app, that will support millions of user accounts, template-based user pages and files upload. The client is going to be written in Flash. I wondered if I coudl...
10
by: David Coleman | last post by:
I am running VS 2003 and have applied SP1. (On WinXP SP2, .Net 1.1) In the Command Window I get the following ? Math.Round(0.715, 2) 0.72 ? Math.Round(0.725, 2) 0.72 ? Math.Round(0.735, 2)...
7
by: kkmigas | last post by:
Can some one explain if this can be fixed using php.ini settings ? echo "round 20.545 -".round(20.545,2)."<br>"; echo "round 20.555 -".round(20.555,2)."<br>"; echo "number_format 20.545...
4
by: =?Utf-8?B?UmVuZQ==?= | last post by:
Hello everyone I have a problem with Math.Round, it´s ocurring some strange: Math.Round(12.985) = 12.98, it´s wrong. It should be: 12.99 Why?? What is the problem? Help ME !!!!
0
by: Edwin.Madari | last post by:
>>round(76.1, -2) 100.0 80.0 76.0 builtin function round, will work for you...... Help on built-in function round in module __builtin__: round(...) round(number) -floating point number
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.