Access 2007 Query Expression Round and IIF

dltoney2

New member
Local time
Today, 02:44
Joined
Mar 28, 2014
Messages
4
I have an expression that sets an AI Buy It Now value that is 125% of AI Value and rounds it, which follows

AI Buy It Now: Round(([AI Value]*1.25)/10)*10

I need to add to this expression that I only want this calculation applied if AI Values are greater than 999. But I can't figure out how to add this stipulation to the above expression. I have tried IIF but it is not working. Appreciate help.
 
What about the below code?
Code:
AI Buy It Now: Iif([AI Value]>999, Round(([AI Value]*1.25)/10)*10, [AI Value])
 
Thank you for the timely response. This does exactly what I asked for, but I see I needed to ask for a bit more. In addition to the following code that you supplied, for those AI Values less than or equal to 999 I need a Null value (the field is empty). Where would that part of the code go and how? Thanks again.

What about the below code?
Code:
AI Buy It Now: Iif([AI Value]>999, Round(([AI Value]*1.25)/10)*10, [AI Value])
 
Just replace the [AI Value] with Null
Code:
AI Buy It Now: Iif([AI Value]>999, Round(([AI Value]*1.25)/10)*10, Null)
 
Thank you!! Works PERFECT.

This is my very first post at this website and I am so thrilled that you have been so very helpful and quick about it too!!!! You rock!!!! Thank you, thank you.

Just replace the [AI Value] with Null
Code:
AI Buy It Now: Iif([AI Value]>999, Round(([AI Value]*1.25)/10)*10, Null)
 

Users who are viewing this thread

Back
Top Bottom