fractional part of value returns multiple digits

  • Thread starter Thread starter Bill.Carlson
  • Start date Start date
B

Bill.Carlson

Access 2007

We have imported data (through copy and paste append) from another
application into an Access table and we are struggling with
maintaining a value with only 2 decimals as this value is later used
in excel vlookup functions.

In my simple query, I have tried Round([ValueField],2) -- the query
still returns values such as 115.01000213623 for any data element that
is not a whole number.

How may I return a value of just 115.01 in the above example -- we
need the result to be a number and not text.

As always, help is much appreciated,

Bill Carlson
 
Bill.Carlson said:
Access 2007

We have imported data (through copy and paste append) from another
application into an Access table and we are struggling with
maintaining a value with only 2 decimals as this value is later used
in excel vlookup functions.

In my simple query, I have tried Round([ValueField],2) -- the query
still returns values such as 115.01000213623 for any data element that
is not a whole number.

How may I return a value of just 115.01 in the above example -- we
need the result to be a number and not text.


Make the field in its table a Currency field instead of
Double. If necessary, Round should then be able to polish
it up.
 
If up to 4 decimal places is acceptable, use the CCur function. It does do a
bit of rounding.

Another method which would truncate everything after the 2nd decimal point:

CLng([ValueField] * 100)/100
 
If up to 4 decimal places is acceptable, use the CCur function.  It does do a
bit of rounding.

Another method which would truncate everything after the 2nd decimal point:

CLng([ValueField] * 100)/100
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.



Bill.Carlson said:
Access 2007
We have imported data (through copy and paste append) from another
application into an Access table and we are struggling with
maintaining a value with only 2 decimals as this value is later used
in excel vlookup functions.
In my simple query, I have tried Round([ValueField],2) -- the query
still returns values such as 115.01000213623 for any data element that
is not a whole number.
How may I return a value of just 115.01 in the above example -- we
need the result to be a number and not text.
As always, help is much appreciated,
Bill Carlson
.- Hide quoted text -

- Show quoted text -

Wonderful! -- Thank you Marshall, Jerry.
 
Back
Top