我正在尝试使此QC显示文件失败的原因。我已经建立的质量控制效果很好,但是当我尝试给出原因时,除了无效的邮政编码外,所有其他功能都起作用。如果QC因任何其他原因而捕获并出错,则给出该原因以及无效的邮政编码。我将原因逻辑放在下面,并指出了我认为存在问题的领域。
Reason: IIf([CNMC Import.Gf_Date] Is Null,"No gift date, ","") & IIf([CNMC Import.Gf_Amount] Is Null,"No gift amount, ","") &
IIf([CNMC Import.Gf_CnBio_Key_Indicator] Is Null,"No individual or organization indicator, ","") &
IIf([CNMC Import.Gf_CnAdrSal_Addressee] Is Null,"No Addressee, ","") &
IIf([CNMC Import.Gf_CnAdrSal_Salutation] Is Null,"No Salutation, ","") &
IIf([CNMC Import.Gf_CnAdrPrf_Addrline1] Is Null,"No street address, ","") &
IIf([CNMC Import.Gf_CnAdrPrf_City] Is Null,"No city, ","") &
IIf([CNMC Import.Gf_CnAdrPrf_State] Is Null,"No state, ","") &
IIf([CNMC Import.Gf_CnAdrPrf_ZIP] Is Null,"No Zip Code, ","") &
**IIf(([CNMC Import.Gf_CnAdrPrf_ZIP] Not Like "#####-####" & [CNMC Import.Gf_CnAdrPrf_ZIP]) Not Like "#####","Invalid zip code, ","")**
最佳答案
尝试一下(使用IIf 2次):
IIf([CNMC Import.Gf_CnAdrPrf_ZIP] Like "#####-####", ",", IIf([CNMC Import.Gf_CnAdrPrf_ZIP]) Like "#####", ",", "Invalid zip code")
关于mysql - IIF不喜欢Access 2007中的语句,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24651083/