IIF with Multiple options

  • Thread starter Thread starter Bill K
  • Start date Start date
B

Bill K

I would like to use the IIF to return values, but can find
the syntax to accomplish what I want to do. Any help is
appreciated. Example

D=Defect, M=Maint, E=Enhancement

Standard is: =iif([type]is null, "Not Assigned", [type])

trying to do something like:
iif([type] is null, "Not Assigned", [type]
="D", "Defect"....

Thanks.

BK
 
I would like to use the IIF to return values, but can find
the syntax to accomplish what I want to do. Any help is
appreciated. Example

D=Defect, M=Maint, E=Enhancement

Standard is: =iif([type]is null, "Not Assigned", [type])

trying to do something like:
iif([type] is null, "Not Assigned", [type]
="D", "Defect"....

Thanks.

BK

Are those the only choices?

Exp:IIf(IsNull([Type]),"Not Assigned",IIf([Type] =
"D","Defect",IIf([Type] = "M","Maint","Enhancement")))
 
These are the only choices.
Received a warning:

The expression you entered contains invalid syntax.
You may have entered an operand without an operator

Appreciate the help
Bill
-----Original Message-----
I would like to use the IIF to return values, but can find
the syntax to accomplish what I want to do. Any help is
appreciated. Example

D=Defect, M=Maint, E=Enhancement

Standard is: =iif([type]is null, "Not Assigned", [type])

trying to do something like:
iif([type] is null, "Not Assigned", [type]
="D", "Defect"....

Thanks.

BK

Are those the only choices?

Exp:IIf(IsNull([Type]),"Not Assigned",IIf([Type] =
"D","Defect",IIf([Type] = "M","Maint","Enhancement")))
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
These are the only choices.
Received a warning:

The expression you entered contains invalid syntax.
You may have entered an operand without an operator

Appreciate the help
Bill
-----Original Message-----
I would like to use the IIF to return values, but can find
the syntax to accomplish what I want to do. Any help is
appreciated. Example

D=Defect, M=Maint, E=Enhancement

Standard is: =iif([type]is null, "Not Assigned", [type])

trying to do something like:
iif([type] is null, "Not Assigned", [type]
="D", "Defect"....

Thanks.

BK

Are those the only choices?

Exp:IIf(IsNull([Type]),"Not Assigned",IIf([Type] =
"D","Defect",IIf([Type] = "M","Maint","Enhancement")))
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

It works for me. Perhaps you copied the expression incorrectly.

Why don't you copy and paste into a reply message your exact
expression?
 
Have you considered a small lookup table that ties a code with a
description?
When you have multile IIf()s, you might want to use the Switch() function.

--
Duane Hookom
MS Access MVP


Bill K said:
These are the only choices.
Received a warning:

The expression you entered contains invalid syntax.
You may have entered an operand without an operator

Appreciate the help
Bill
-----Original Message-----
I would like to use the IIF to return values, but can find
the syntax to accomplish what I want to do. Any help is
appreciated. Example

D=Defect, M=Maint, E=Enhancement

Standard is: =iif([type]is null, "Not Assigned", [type])

trying to do something like:
iif([type] is null, "Not Assigned", [type]
="D", "Defect"....

Thanks.

BK

Are those the only choices?

Exp:IIf(IsNull([Type]),"Not Assigned",IIf([Type] =
"D","Defect",IIf([Type] = "M","Maint","Enhancement")))
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top