The following is my IIF statement in my query:
Buyer_Name will be substituted with an actual name when the statement is working correctly.
When I paste it into the query, access changes it to this and when I try to run it, it asks me for the parameter value--"12W", etc.:
What can I do to get this to work?
Any help would be appreciated as quickly as possible.
Thanks,
MS
Code:
BuyerName: IIf([BuyerCode]="12W",“Buyer_Name”,IIf([BuyerCode]=“12U”,“Buyer_Name”,IIf([BuyerCode]=“12M”,“Buyer_Name”,IIf([BuyerCode]=“12X”,“Buyer_Name”,IIf([BuyerCode]=“12P”,“Buyer_Name”,IIf([BuyerCode]=“12D”,“Buyer_Name”,IIf([BuyerCode]=“EXC”,“NO_BUYER”,IIf([BuyerCode]=“FGT”,“FREIGHT”,“NA”))))))))
When I paste it into the query, access changes it to this and when I try to run it, it asks me for the parameter value--"12W", etc.:
Code:
BuyerName: IIf([BuyerCode]=[“12W”],[“Buyer_Name”],IIf([BuyerCode]=[“12U”],[“Buyer_Name”],IIf([BuyerCode]=[“12M”],[“Buyer_Name”],IIf([BuyerCode]=[“12X”],[“Buyer_Name”],IIf([BuyerCode]=[“12P”],[“Buyer_Name”],IIf([BuyerCode]=[“12D”],[“Buyer_Name”],IIf([BuyerCode]=[“EXC”],[“NO_BUYER”],IIf([BuyerCode]=[“FGT”],[“FREIGHT”],[“NA”]))))))))
Any help would be appreciated as quickly as possible.
Thanks,
MS
Comment