Hi I have a number of suppliers tariffs which show a rate per half or full kilo depending on the service, these normally go up to a given weight and then have a fixed amount per half or full kilo thereafter to manage this I have the following
=IIf([cboWeight]>20,DLookUp("Rate","qryExpressCourier","CountryID=Forms!frmCountry!cboCountry And Weight=20")+([Forms]![frmCountry]![cboWeight]-20)*DLookUp("Rate","qryExpressCourier","CountryID=Forms!frmCountry!cboCountry And Weight=-1"),DLookUp("Rate","qryExpressCourier","CountryID=Forms!frmCountry!cboCountry And Weight=Forms!frmCountry!cboWeight"))
To allow for weights above 20 to make this work I have an additional field in my table that is -1 and then the rate per kilo for that zone.
One of my suppliers though gives rates for weights up to 70.50 kilos in 9 different zone bands, zone r for example has individual rates for each half kilo from 0.5 to 70.5 and then has
71-99 kilos = 70.5 kilo rate (£62.16) + £1.20 per kilo
100-299 kilos = £110 + £1.10 per kilo
300-499 kilos = £330 + £1.10 per kilo
500-999 kilos = £500 + £1.00 per kilo
1000+ kilos = £1000.00 + £1.00 per kilo
I guess somehow that I am going to have to use < > but I am getting my knickers in a twist
Should each of these 'break' points be noted on my table? I can obviousely manage the 1st break in the same way as I have done on the simple tariff, that is by adding to my table zone a - weight -1 rate 1.20 but how do I then limit it to only going up to 99 kilos.
I figure that I am going to need a -2 rate to represent 100 - 299 kilos, a -3 rate to reprsent 300 - 499 kilos.
Can some kind soul please put me on the straight and narrow
Cheers
Tig
=IIf([cboWeight]>20,DLookUp("Rate","qryExpressCourier","CountryID=Forms!frmCountry!cboCountry And Weight=20")+([Forms]![frmCountry]![cboWeight]-20)*DLookUp("Rate","qryExpressCourier","CountryID=Forms!frmCountry!cboCountry And Weight=-1"),DLookUp("Rate","qryExpressCourier","CountryID=Forms!frmCountry!cboCountry And Weight=Forms!frmCountry!cboWeight"))
To allow for weights above 20 to make this work I have an additional field in my table that is -1 and then the rate per kilo for that zone.
One of my suppliers though gives rates for weights up to 70.50 kilos in 9 different zone bands, zone r for example has individual rates for each half kilo from 0.5 to 70.5 and then has
71-99 kilos = 70.5 kilo rate (£62.16) + £1.20 per kilo
100-299 kilos = £110 + £1.10 per kilo
300-499 kilos = £330 + £1.10 per kilo
500-999 kilos = £500 + £1.00 per kilo
1000+ kilos = £1000.00 + £1.00 per kilo
I guess somehow that I am going to have to use < > but I am getting my knickers in a twist
Should each of these 'break' points be noted on my table? I can obviousely manage the 1st break in the same way as I have done on the simple tariff, that is by adding to my table zone a - weight -1 rate 1.20 but how do I then limit it to only going up to 99 kilos.
I figure that I am going to need a -2 rate to represent 100 - 299 kilos, a -3 rate to reprsent 300 - 499 kilos.
Can some kind soul please put me on the straight and narrow
Cheers
Tig