A
anyaley via AccessMonster.com
I am using a calculated field called "Balance" in a query which is the sum of
total credits less total debits for an account.i.e Balance: sum(([cramt]-
[dramt])) and is OK. Now I want to it based on Account Type. i.e
If Acctyp = "D" Balance: sum(([dramt]-[cramt]))
If Actype = "C" Balance: sum(([cramt]-[dramt]))
How can I use one iif expression to do this. I tried this below but it did
not work;
Balance: iif [Acctyp] = "D", sum(([dramt]-[cramt])),sum(([cramt]-[dramt]))
Please help
total credits less total debits for an account.i.e Balance: sum(([cramt]-
[dramt])) and is OK. Now I want to it based on Account Type. i.e
If Acctyp = "D" Balance: sum(([dramt]-[cramt]))
If Actype = "C" Balance: sum(([cramt]-[dramt]))
How can I use one iif expression to do this. I tried this below but it did
not work;
Balance: iif [Acctyp] = "D", sum(([dramt]-[cramt])),sum(([cramt]-[dramt]))
Please help