Your rounding logic is not consistent.
9.2 goes to 9
but 9.6 goes to 10?
Are you sure of this? What is the logic to round down 9.2 and round up 9.6?
im sorry
i think im a bit confused i have to have a field in which a weight i
put to the nearest 0.5 of a kilogram, a combo or list box has to man
value so its not convienient so i have to format the field so that if
acustomer puts in
8.1 rounds to 8
8.2 rounds to 8
8.3 rounds to 8.5
8.4 rounds to 8.5
8.5 its ok
8.6 rounds to 8.5
8.7 rounds up to 9
8.8 rounds up to 9
8.9 rounds up tp 9
does this seem correct
thanks again for you time and hel
--
iksing
Tim Ferguson - 24 Apr 2005 15:24 GMT
> i have to have a field in which a weight is
> put to the nearest 0.5 of a kilogram,
= IIf(Int(dblWeight*2)=0, dblWeight, Int(dblWeight * 2 + 0.5) * 0.5)
Hope that helps
Tim F
Wayne Phillips - 24 Apr 2005 16:20 GMT
Your logic is still inconsistant.
Why would 8.7 round up to 9??? Surely you mean round down to 8.5
Regards,
Wayne Phillips
http://www.everythingaccess.com - Access Database Repair Service
> im sorry
>
[quoted text clipped - 16 lines]
>
> thanks again for you time and help