How to Reduce Decimal Places?

L

lbohen

In Access 2003, how do I reduce the decimal places in a text field?

For example: 10.406666295 to 10.46.
 
K

KARL DEWEY

Your example is wrong - correct - example: 10.406666295 to 10.40.
Reduced_Decimal_Places: Left([YourTextField], InStr([YourTextField],
".")+2)
 
J

Jerry Whittle

In a form, report, or query, you can use the Format function.

Format(10.406666295, "#0.00") = 10.41

I'm assuming that your 10.46 was a typo. Notice that it rounds up in this
case.

On problem with the Format function is that it returns a string and not a
number.
 

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

Top