Sin has attended:
Access Intermediate course
Access Advanced course
Access VBA course
Calculations (expressions) in queries
I have a query with three with three amounts: Ammount 1, 2 & 3. I want to build a calculation in a fourth column that says that if the total from these three is 0, then put the word yes in this 4th column, and if the cumulative total is greater than 0, then put the word No in the 4th column. How do I do this?
RE: calculations (expressions) in queries
Hi
You can use the IIF function to do this.
Add the below to a new field name in your query.
Expr1: IIf([result]>=0,"Yes","No")
You might need to adapt it to your purpose but essentially:
for example, embed another IIF statement in the false answer part of the statement.
Expr1: IIf([result]=0,"Yes",IIf([result]>0,"Yes","No"))
That should work
Regards
Richard