M
mattc66 via AccessMonster.com
I have a really long IIF statement in a Query. I need an ELSE at the end,
because if its none of the options then I need it to be Z. Otherwise my sub
query whiches uses these codes has a blank fld.
Does anyone have any suggestions on how I could handle this?
This is all in the Query
BILLOPT: IIf(Mid([SHIP_VIA],4,2)="","Z",IIf(Mid([SHIP_VIA],4,2)="PB","PB", _
IIf(Mid([SHIP_VIA],4,2)="PP","PP",IIf(Mid([SHIP_VIA],4,2)="FC","FC", _
IIf(Mid([SHIP_VIA],4,2)="TP","TP",IIf(Mid([SHIP_VIA],4,2)="CO","CO", _
IIf(Mid([SHIP_VIA],4,2)="CB","CB")))))))
because if its none of the options then I need it to be Z. Otherwise my sub
query whiches uses these codes has a blank fld.
Does anyone have any suggestions on how I could handle this?
This is all in the Query
BILLOPT: IIf(Mid([SHIP_VIA],4,2)="","Z",IIf(Mid([SHIP_VIA],4,2)="PB","PB", _
IIf(Mid([SHIP_VIA],4,2)="PP","PP",IIf(Mid([SHIP_VIA],4,2)="FC","FC", _
IIf(Mid([SHIP_VIA],4,2)="TP","TP",IIf(Mid([SHIP_VIA],4,2)="CO","CO", _
IIf(Mid([SHIP_VIA],4,2)="CB","CB")))))))