Creating a formula in an Access Query....question about a zero

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have 3 fields. [unitprice] [quantity] [discount]

Total:([unitprice]*[quantity])*[discount]

This works great unless the discount is zero. How can I fix this. I'm
thinking
an if statement somewhere but I had off yesterday so my brain is not
functioning today. Thanks in advance for your help.
Sincerely,
Ken
 
KenRamoska said:
Hi,
I have 3 fields. [unitprice] [quantity] [discount]

Total:([unitprice]*[quantity])*[discount]

This works great unless the discount is zero. How can I fix this. I'm
thinking
an if statement somewhere but I had off yesterday so my brain is not
functioning today. Thanks in advance for your help.
Sincerely,
Ken

Can I assume that if a customer gets a 10% discount your "discount"
would be 0.90 If there is no discount then your "discount" should indicate
1.0
 
Rick, looks like you are having a tough Tuesday also.
If you look closer I have used ()'s in my formula.
Taking what you wrote...
( $1.00 x 2) x 30% = Does work for everything but a 0% possibility.

If you look one post below another person suggested a possible solution.


Rick B said:
Your formula does not work.


$1.00 x 2 x 30% = $0.60


--
Rick B



KenRamoska said:
Hi,
I have 3 fields. [unitprice] [quantity] [discount]

Total:([unitprice]*[quantity])*[discount]

This works great unless the discount is zero. How can I fix this. I'm
thinking
an if statement somewhere but I had off yesterday so my brain is not
functioning today. Thanks in advance for your help.
Sincerely,
Ken
 
Yes, but you might reconsider the name of your field. If a customer pays
90% of retail, then they are not getting a 90% "discount".


--
Rick B



KenRamoska said:
Rick, looks like you are having a tough Tuesday also.
If you look closer I have used ()'s in my formula.
Taking what you wrote...
( $1.00 x 2) x 30% = Does work for everything but a 0% possibility.

If you look one post below another person suggested a possible solution.


Rick B said:
Your formula does not work.


$1.00 x 2 x 30% = $0.60


--
Rick B



KenRamoska said:
Hi,
I have 3 fields. [unitprice] [quantity] [discount]

Total:([unitprice]*[quantity])*[discount]

This works great unless the discount is zero. How can I fix this. I'm
thinking
an if statement somewhere but I had off yesterday so my brain is not
functioning today. Thanks in advance for your help.
Sincerely,
Ken
 
Back
Top