The table name is sales
filed names are Name, amount
now how can I create a query in which I can select some customer with a discount and some with no discount and calculate their total accordingly
like yes/no field and if yes then how do I tell calculated field to select those customer
I created a yes and no field in my sales table, and create a calculated field in a query, now when I run a query it still calculates non discount customers
Ah, try instead:whereas my yes or no field name is [discount] and my gross amount field is [Amount] and my calculation in another field (I don't know how to write an expression) What I am trying to do is to calculate only selected customer from my yes or no field. what I did was
iif([discount] than[amount]*.0625.
IIf([discount],[amount]*.0625,0)
Hi. You're welcome. Glad to hear you got it to work. Good luck with your project.Thanks It works