IIF Statement

nh1234

Registered User.
Local time
Today, 11:25
Joined
Dec 27, 2005
Messages
26
Hi,

I'm running a query and pulling in a status field, with the following selections:
25% to sell
50% to sell
Sold

I've added an IIF statement (see below) to change the sold to 100%, however, it will only return 100% and does not pull in any of the other data.

IIF([Salesboard4]![Status]="Closed",100%).

How do I change my statement to pull in all data and change the sold to 100% at the same time.

Any help will be much appreciated.

Thanks
 
Well, your example shows says SOLD, but you show Closed....
Try this
IIF([Salesboard4]![Status]="Closed","100%",[Salesboard4]![Status])
 
hi,

Sorry about that, it could be sold or closed. The problem I'm having with this is I have to reference more than one category:

Closed
Sold
25% to sell
50% to sell
75% to sell

IIF[salesboard]![Status] = "Closed","100%",[salesboard]![Status]="Sold","100%",[salesboard]![Status]="25% to sell","25%"........

How do I group to get it to run? I try putting parenthases around each condition with an "and" in between, but it won't run. HELP.
 
hi,

Sorry about that, it could be sold or closed. The problem I'm having with this is I have to reference more than one category:

Closed
Sold
25% to sell
50% to sell
75% to sell

IIF[salesboard]![Status] = "Closed","100%",[salesboard]![Status]="Sold","100%",[salesboard]![Status]="25% to sell","25%"........

How do I group to get it to run? I try putting parenthases around each condition with an "and" in between, but it won't run. HELP.
 
Your IIF statement will look like this

IIF[salesboard]![Status] = "Closed","100%",IIf([salesboard]![Status]="Sold","100%",IIf([salesboard]![Status]="25% to sell","25%",IIF(........))))))
With the reqired number of closing parenthesis, 6 I think as you are nesting 6 IIFs

Brian
 

Users who are viewing this thread

Back
Top Bottom