I'm having trouble with this code:
contact: IIf(IsNull([COMPOFCR] Or [COMPOFCR]="ZZZ"),"Compliance Section at 555-5555",[First Name] & " " & [Last Name] & " at 555-5555 ext " & [Extension])
The COMPOFCR field could either be null, "ZZZ" or an officers code. If it's null or "ZZZ" then the contact needs to be Compliance Section or else the officer's name and extension. This code works for the null values, but for the "ZZZ" values I get this returned: "at 555-5555 ext"
Any suggestions?
contact: IIf(IsNull([COMPOFCR] Or [COMPOFCR]="ZZZ"),"Compliance Section at 555-5555",[First Name] & " " & [Last Name] & " at 555-5555 ext " & [Extension])
The COMPOFCR field could either be null, "ZZZ" or an officers code. If it's null or "ZZZ" then the contact needs to be Compliance Section or else the officer's name and extension. This code works for the null values, but for the "ZZZ" values I get this returned: "at 555-5555 ext"
Any suggestions?