Hi,
I have a lot of long IIf-statements in my database and apparently I just went overboard. When trying to add a criteria an error pops up: "Expression too complex in query expression".
That's why I think it's time to convert some IIf-statements to a table logic. I'm however struggling to piecing together the puzzle. E.g. I'm not able to translate the [value_if_false] argument to a table. Furthermore the multiple fields ([Created by] and [POrg] aren't helping either.
Could someone help me out by translating the IIf-statement below to a table?
I have a lot of long IIf-statements in my database and apparently I just went overboard. When trying to add a criteria an error pops up: "Expression too complex in query expression".
That's why I think it's time to convert some IIf-statements to a table logic. I'm however struggling to piecing together the puzzle. E.g. I'm not able to translate the [value_if_false] argument to a table. Furthermore the multiple fields ([Created by] and [POrg] aren't helping either.
Could someone help me out by translating the IIf-statement below to a table?
Auto/Man: IIf([Created by]="V0XSLLS";"auto";IIf([Created by]="V1BAT02";"auto";IIf([Created by]="V0XBATCH";"auto";IIf([Created by]="V0XPM";"auto";IIf([Created by]="BTMMABAT";"auto";IIf([Created by]="V0XDISP";"auto";IIf([Created by]="BTPSBAT";"auto";IIf([Created by]="SHSBATCH";"auto";IIf([Created by]="V0XSLA";"auto";IIf([POrg]="BE35";"auto";IIf([Created by] Like "O3*";"auto";"man")))))))))))