Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decimal and rounding issue? 1

Status
Not open for further replies.

Apollo6

Technical User
Jan 27, 2000
418
US
I am using Access97...

I have a table that has a Number field with the following setup, Single, Fixed, 2 decimal places. I have several records that have the following issue:

Actuall value in field is -0.009994895
Display value in field is -0.01

The value I want is -0.01

I am exporting this data into a comma delimited file to be imported into anther system. However, when the flat file is built, it doesn't use the -0.01, it uses the -0.009994895. How do I "hardcode" the value to the rounded number. Can I do an update query against the table to hardcode the values? Any suggestions are appreciated.
 
Apollo6,

Here's what I would do to assure 2 decimal places...
[tt]
=INT(([YourField]+0.001)*100)/100
[/tt]


Skip,

[glasses] [red]Be advised:[/red] When transmitting sheet music...
If it ain't baroque, don't fax it! [tongue]
 
That's exactly what I needed. Thanks a lot!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top