rounding to 0.005 or 0.01

J

john

How do i round up the validate a field so that it only shows numbers that are
0.005 or 0.01????

Thax in adv
 
J

John Vinson

How do i round up the validate a field so that it only shows numbers that are
0.005 or 0.01????

Thax in adv

Which do you want to do - round the field, or validate it? Those are
two quite different operations!

If your field is a Currency datatype, you can round to the nearest
..005 with an expression

Round([field] * 200., 0) / 200.

use 100 to round to the nearest hundredth.

If you are using Single or Double, be aware that these datatypes are
approximations; it may not be possible to store .01 accurately in a
field - what gets stored may be .01000000000003 or .00999999999998
depending on how the binary fraction is truncated.

John W. Vinson[MVP]
 
Top