在Access 2010中,我试图列出IIF语句中的结果,但是由于某些原因无法正常工作。
DogTrainingStatus: IIf(([TrainingSuccess]>"*Pass*") And ([TrainingSuccess]>"*Failed*"),"Failed", IIf([TrainingSuccess]>"Failed","Failed"," "))
这是我的列表:
DogGroups - TrainingSuccess
---------------------------
A - Pass, Pass, Pass
B - Pass, Pass, Failed
C - (Blank)
D - Failed, Failed, Failed
我需要以下结果:
DogGroups - TrainingSuccess
---------------------------
A - Pass
B - Failed
C - (Blank)
D - Failed
答案 0 :(得分:1)
假设字段包含CSV文本,并且您想要的结果遵循逻辑:如果字段为Null,则返回Null;否则,如果字段包含“ Failed”,则返回“ Failed”,否则为“ Passed”,请考虑:
DogTrainingStatus: IIf([TrainingSuccess] Is Null, Null, IIf([TrainingSuccess] LIKE "*Failed*", "Failed", "Passed"))