I want to create a calculated field in an Access report using the Sum IIf function with multiple conditions.
When only one condition is used, the formula works just fine: =Sum(IIf([Balance]="ABC",[Amount],0))
Similarly, I get the correct results when I plug in the other condition, =Sum(IIf([Balance]="XYZ",[Amount],0))
But when I combine the two conditions with an Or function, nothing happens.
=Sum(IIf([Balance]="ABC" Or [Balance]="XYZ",[Amount],0))
Am I using the wrong syntax?
Thanks in advance.
Roger