rounding to 0.005 or 0.01

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top