We have a truck (#117) that is cheaper in labor then all our other trucks. But the price does differ for each company we bill. (Water haul for lease sites in Oil field industry)
I broke it down like this
That determines the rate charges, on my report i'd like the txt box (unbound) to be autopopulated based on the criteria of the billto company and the trucknum.Code:If [BillTo]=5 AND [TruckNum]=117 Then 77.00 else 93.50 End If If [BillTo]=4 AND [TruckNum]=117 Then 65.00 else 80.00 End If If [BillTo]=3 AND [TruckNum]=117 Then 78.00 else 88.00 End If If [BillTo]=6 Then 90.00 End If If [BillTo]=11 Then 1.00 End If If [BillTo]=15 AND [TruckNum]=117 Then 80.00 End If If [BillTo]=12 Then 100.00 End If If [BillTo]=8 AND [TruckNum]=117 Then 80.00 else 90.00 End If
Should I do a Case statement or a switch of some sort? I'm really bad with code. Please help me out?