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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Status based on two parameters

Status
Not open for further replies.

MyaCCt

MIS
May 14, 2014
21
US
Good morning,

I have a query where I want to use two fields to give a record of a status of either "In Process," "Alterations," or "Complete." In order for a record to be "In Process" I need the tool name to have a name that starts with A and have a Null [Actual Completed] date. For the "Alterations," the record would have a tool name starting with B and the [Actual Completed] date would be null. "Complete" would be any tool name, but the [Actual Completed] would be populated.

Here's what I've tried. I'm getting the error about "wrong number of arguements." Are my parenthesis in the wrong place?

Process2: IIf([TOOL_ID] Like "ABCD*" and [Actual Completed] is null),"In Process",IIf([TOOL_ID] Like "BCD*" and [Actual Completed] is null),"Alterations", IIf([Actual Completed] is not null),"Complete"

Thanks in advance!
 

How about:
Code:
iif(not isnull([Actual Completed]), "Complete",iif(Left([TOOL_ID],1) = "A", "In Process", "Alterations"))



Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top