467,119 Members | 744 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,119 developers. It's quick & easy.

I need some optional calculation formula in a form

I need some optional calculation formula in a form

My Subform Fields:
Quantity -50
Selling Price1-$250 (this is the 2nd preferred)
ADisc Price2- $240 (this is the 1st preferred)
Amount: CCur(Nz([Quantity]*[ADisc Price2],0) Or CCur(Nz([Quantity]*[Selling Price1],0)

Actually my calculation is Quantity * ADisc Price2 Or if ADisc Price2 field is “0 “then will take from Selling Price1 field.
ADisc Price2 field is after discount deduct amount so this is the 1st preferred for calculation total amount but some time no discount allowed ADisc filed is “0” that time how to give a formula?? I have used the formula above in Amount field but that is not working properly. So can you please replay how to take a formula?

Nov 20 '14 #1
  • viewed: 797
2 Replies
Expert 1GB
I think you are looking for an iif() (inline if, https://support.office.com/en-us/art...0-647539c764e3):
Expand|Select|Wrap|Line Numbers
  1. iif(CCur(Nz([Quantity]*[ADisc Price2],0)=0, CCur(Nz([Quantity]*[Selling Price1],0), CCur(Nz([Quantity]*[ADisc Price2],0))
Nov 21 '14 #2
Perfect - Thank you very much!
Nov 21 '14 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by gavo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.