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

Help Needed with If Function Question 1

Status
Not open for further replies.

RDM23

Technical User
May 16, 2007
39
US
Below is a copy of the query that returns either Pr, Sr, or Alert. For the Pr and Sr part, I also need to include if [Level]=M4 and [Type]=EX. I want to include that so if Left 2 of decription is Pr, and Level=M4, and Type=EX, then return Pr. Same for Sr, so if Left 2 of decription is Sr, and Level=M4, and Type=EX, then return Sr,

Sr_or_Pr: IIf(Left([Description],2)="Pr","Pr",IIf(Left([Description],2)="Sr","Sr","Alert"))

Thanks in advance for any assistance.
 
Sr_or_Pr: IIf(Left([Description],2) In ('Pr','Sr') AND [Level]='M4' AND [Type]='EX',Left([Description],2),'Alert')

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

Part and Inventory Search

Sponsor

Back
Top