How to do this

Vu_Ho

Registered User.
Local time
Today, 11:37
Joined
Aug 19, 2013
Messages
20
My question is this:
I have several controls:
[Order_Type] with 3 values: Regular, Rush and Extremely Rush, [Unit_Price], [Quantity] and [Total]
By default: [Total]=[Unit_Price]*[Quantity]
What I want is when [Order_Type]="Rush" then [Total] would be:[Unit_Price]*[Quantity]+20 and if [Order_Type]="Extremely Rush" then [Total] would be: [Unit_Price]*[Quantity]+30
What would be the code for this?
 
I would maintain the types in a table along with the additional amount. I'd use a combo to let the user choose the type, and the combo row source would include the amount. Then your calculation is

[Total]=([Unit_Price]*[Quantity]) + Order_Type.Column(1)

getting the amount from the second column of the combo.
 

Users who are viewing this thread

Back
Top Bottom