I am currently trying to create a nested if statement
field in an access database
that fills data based on criteria it has to meet.
So far this is what I have in the expression builder:
IIf([JDE Aging Report].[Term]="PPL" And [JDE Aging Report].[OpenAmount]>0,"PPL Sale",
IIf([JDE Aging Report].[Term]="PPL" And [JDE Aging Report].[OpenAmount]<0,"PPL Credit",
IIf([JDE Aging Report].[Term]="AE" Or "DSC" Or "MC" Or "VSA" And [JDE Aging Report].[OpenAmount]<0,"CC Credit",
**IIf([JDE Aging Report].[Term]="AE" Or "DSC" Or "MC" Or "VSA" And [JDE Aging Report].[OpenAmount]>1,"CC Sale"))))**
For some reason it is not picking up the last parameter in the expression (in bold) and as a result the data that is being updated is incorrect.
Can someone tell me what I am doing wrong? Is there a limitation when it comes to building nested if statements
in an access database
?
Many thanks!