G
Guest
I have a field named "SEGCODE", in a query design view.
In a calculated field named "NEWSEGCODE", I need to write the following
expression.
If SEGCODE field has "A", write "A1"
Else If SEGCODE field has "B", write "B3"
Else If SEGCODE field has "C", write "C8"
Else just copy anything from "TYPE" field into "NEWTYPE".
I used Nested IIf and it did not quite work.
NEWTYPE: IIf([SEG_CODE]="A","A1 " , (IIf([SEG_CODE]="B","B3 ",
(IIf[SEG_CODE]="C","C8" , Format([SEG_CODE], "@;"))))
In a calculated field named "NEWSEGCODE", I need to write the following
expression.
If SEGCODE field has "A", write "A1"
Else If SEGCODE field has "B", write "B3"
Else If SEGCODE field has "C", write "C8"
Else just copy anything from "TYPE" field into "NEWTYPE".
I used Nested IIf and it did not quite work.
NEWTYPE: IIf([SEG_CODE]="A","A1 " , (IIf([SEG_CODE]="B","B3 ",
(IIf[SEG_CODE]="C","C8" , Format([SEG_CODE], "@;"))))