Help needed to a rookie.

Vallan

Registered User.
Local time
Today, 15:12
Joined
Jan 16, 2008
Messages
46
Hello.

I dont know if this is possible but i hope.

I have transports.

transport one is based on volume. Ex to destination 1 it costs 12 euro/m3

transport two is a fixed price. Ex to destination 4 it cost 100 euro


My problem is that i want to get the total sum in to the query.

I cant use "Cost" * "m3" because then it will do the same to the fixed price.

I have done a table with destinations wich includes name, distance, price.

The fixed prices i have putted 0 in distance.....so in my mind i think the solution like this.

If "distance" is 0 then "totalprice"="price" else
"totalprice"="price"*"m3"


Is this possible to do and how do i do?


Sorry if my english is rubbish!

Matt
 
Try

IIf(distance = 0, price, price * m3)
 

Users who are viewing this thread

Back
Top Bottom