IIF consisting of three conditions

dastr

Registered User.
Local time
Today, 19:57
Joined
Apr 1, 2012
Messages
43
hi all,

I have the below iif:

iif([table1]![ldp]="1", "Yes", iif([table1]![ldp]="0", "No"))

however I would like to include another condition:

iif([table1]![ldp]=" ", "Yes") ie if the ldp is BLANK, give me again YES

Does anybody know how to combine the above three conditions in one iif?

Thank you in advance.
 
I have the below iif:
iif([table1]![ldp]="1", "Yes", iif([table1]![ldp]="0", "No"))

however I would like to include another condition:

iif([table1]![ldp]=" ", "Yes") ie if the ldp is BLANK, give me again YES

If you only have the three possible values in the field you can just use:
Code:
IIF([table1]![ldp]="1","Yes","No")
This will display "Yes" for only the records where the value is = "1".

If you have other values in the field it is possible to have as many IIF statements as you need:
Code:
iif([table1]![ldp]="1", "Yes", iif([table1]![ldp]="0", "No",iif(isnull([table1]![ldp]),"Yes")))
 
thanks guys
 
Or you could use this.

iif([table1]![ldp]="0", "No","Yes")
 
Hello Mr B, hope you can help me. I have two fields one is a droplist with Open and Closed choices, and I have another date field, I would like to add the following conditions:

1. If the field 1 is "Closed" and the date field has a date show "Won"
2. If the field 1 is "Closed" and the date field is empty show "Lost"
3. Is the field 1 is "Open" and the date field is empty show "Blanc" or leave empty.

is this possible to achieve?

Many thanks for you cooperation.

Regards

Sajarac
 
@sajarac

Welcome to the Forum! :)

Please repost your question as a new one. Posting it at the end of a three year old gets it no attention (No one will see it.)
 
Hope someone can help me. I have two fields one is a droplist with Open and Closed choices, and I have another date field, I would like to add the following conditions:

1. If the field 1 is "Closed" and the date field has a date show "Won"
2. If the field 1 is "Closed" and the date field is empty show "Lost"
3. Is the field 1 is "Open" and the date field is empty show "Blanc" or leave empty.

is this possible to achieve?

Many thanks for you cooperation.

Regards

Sajarac
 
@sajarac

Welcome to the Forum! :)

Please repost your question as a new one. Posting it at the end of a three year old gets it no attention (No one will see it.)


sorry I don't know how to do that :-(
 
When you click on Queries to see the list of questions, top left there is a button label New Thread, clik on that to start a new thread.

Brian
 

Users who are viewing this thread

Back
Top Bottom