Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Procedure IIf Statement 2

Status
Not open for further replies.

dan08

Technical User
Jan 7, 2013
51
0
0
US
I am trying to run this If statement in a query.

IIf(InStr(1,[CandidateTypeE],"Dele")>=1,"Delegate",
IIf(InStr(1,[CandidateTypeE],"Faci")>=1,"Facilitator",
IIf(InStr(1,[CandidateTypeE],"Observer")>=1,"Observer","Ungrouped")))
AS CandidateTypeX


And I keep getting an Invalid Procedure Call error.

Any suggestions?
 
What about this instead ?
IIf([CandidateTypeE] Like "*Dele*","Delegate",
IIf([CandidateTypeE] Like "*Faci*","Facilitator",
IIf([CandidateTypeE] Like "*Observer*","Observer","Ungrouped")))
AS CandidateTypeX

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top