Another IIF question

KenshiroUK

Registered User.
Local time
Today, 13:54
Joined
Oct 15, 2012
Messages
160
I want to create a query that puts these countries into an ICS code Expr3: IIf([ship-country] DE, AT, BE,"CAI","ICS") however I do think there is something missing from this but not sure what. Could somebody help me please?


thanks.
 
Hello Ken, The general form of an IIf is as follows..
Code:
IIf( condition_to_check , True_part , False_part)
comma is the seperator.. if you wish to to have multiple conditions, then you have to seperate them with a logical operator as OR/AND/NOT.. If I remember correctly I asked you to design a table to add codes, so you can perform a JOIN.. but if this is how you wish to go, that's fine.. based on the general If condition would change to..
Code:
IIf(([ship-country]="DE" OR [ship-country]="AT" OR [ship-country]="BE"),"CAI","ICS")
 
Send a short example of your mdb, (Access 2000 or 2002-2003),
and say what you want to do.
 
It worked fine! I do have one more question though, how do I filter out GB orders? Is there a 'NOT' function for the query?
 

Users who are viewing this thread

Back
Top Bottom