gselliott
Registered User.
- Local time
- Today, 10:22
- Joined
- May 17, 2002
- Messages
- 106
I am wanting to set up a form that calculates the insurance cost for delivery of goods depending on their value. The user will enter the value of the goods and i am wanting to be able to automatically calculate the value. Upto the first £1000 the cost is a set charge and for each additional £1000 an additional cost of £5.00 is added.
The problem i am having is that i am not getting an accurate total if the user does not enter exactly £1000, £2000, £3000 etc. (eg if they entered £1500). I think i need to some how need to round up the total for ExtraInsurance1 = (Value / MaxValue).
This is what i have so far:
Dim Value2 As Currency
Dim ExtraInsurance1 As Integer
If Me!Value > Me!MaxValue Then
ExtraInsurance1 = (Value / MaxValue) * ExtraInsurance
Value2 = ExtraInsurance1 - ExtraInsurance
InsCharge = Value2 + InsurancePrice
Else
InsCharge = InsurancePrice
End If
TotalCharge = ChargeToCustomer + InsCharge
End Sub
Any help would be very much appreciated as i am banging my head against the wall now!!
Cheers!
The problem i am having is that i am not getting an accurate total if the user does not enter exactly £1000, £2000, £3000 etc. (eg if they entered £1500). I think i need to some how need to round up the total for ExtraInsurance1 = (Value / MaxValue).
This is what i have so far:
Dim Value2 As Currency
Dim ExtraInsurance1 As Integer
If Me!Value > Me!MaxValue Then
ExtraInsurance1 = (Value / MaxValue) * ExtraInsurance
Value2 = ExtraInsurance1 - ExtraInsurance
InsCharge = Value2 + InsurancePrice
Else
InsCharge = InsurancePrice
End If
TotalCharge = ChargeToCustomer + InsCharge
End Sub
Any help would be very much appreciated as i am banging my head against the wall now!!
Cheers!