need to convert text to number

R

Ron Berns

I am still learning to write code and I know this has to be an easy one,
but for the life of me I cannot get this to work.
I have a string that I want to convert to a number when I put in in the
Table. The records look like this:
162.96
131.28
-30.60
186.24
232.80
When I put them into the table they look like this:
163
131
-31
186
233
My field is set up as Number, Long Integer, Decimal Places = 2

Thanks in advance.

Ron
 
S

Steve Sanford

Integers (and Long Integers) only hold whole numbers. You cannot store a
number with decimals ( ie 3.14) in an Integer type field.

The field types that can hold numbers with decimals are (depending on the
Access version)

for Number data type: Decimal, Single and Double.
or you can use the Currency data type.


In design view of the table, if the field is a number type, look at the
GENERAL TAB at the bottom of the screen and change the FIELD SIZE to a type
that can hold decimals.

HTH
 

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