I have a question about Access database. I'm creating a form. I have a retail price that I want to get a 5% discount from to make a sale price. The sale price is the retail price - the discount but I cannot figure it out. I have been trying this but it does not give me what I want in express builder.

=IIf([Retail Price]>20,0.05*[retail price],0.02*[sale price]) 

I've tried many different combinations but can't get it.

  • So you only want to have a five percent discount if the price is greater than $20 otherwise two percent of sale price? Then you want to subtract this value from the retail price? – Antoine Hernandez Nov 5 '16 at 2:09
  • Note that retail price - 5% of retail price is the same as 95% of retail price. – Michael Green Nov 5 '16 at 3:01

Try this code:

=IIf([Retail Price]>20,[Retail Price]-(0.05*[retail price]),[Retail Price]-(0.02*[retail price]))

Not the answer you're looking for? Browse other questions tagged or ask your own question.