Number rounding

S

Sam

I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is just a
straight entry that later may be used for calculation. What is wrong???
Thanks!
 
L

Lynn Trapp

It sounds like you are using an Integer datatype. Integers are whole numbers
only and have no decimal portion.
 
S

Sam

I have it as a number field. If I use text it will accept my entry as 2.25,
but I need to be able to use it as a calculation later. If I use a number
field it automatically goes to Integer. All I want to do is to be able to
enter a number as 2.25 and have it appear the same and later be able to use
as a calculation. Thanks for your help!
 
S

Sam

I have it set as a number. If I use a text field it will let me input it as
2.25, but I am going to need to be able to calculate it later. When I enter
2.25 it accepts the decimal places but displays it as 2.00. Thanks for your
help!
 
R

Rick B

Change your field size to "single"


Sam said:
I have it as a number field. If I use text it will accept my entry as 2.25,
but I need to be able to use it as a calculation later. If I use a number
field it automatically goes to Integer. All I want to do is to be able to
enter a number as 2.25 and have it appear the same and later be able to use
as a calculation. Thanks for your help!
 
R

Randy Balbuena

Sam said:
I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is
just a
straight entry that later may be used for calculation. What is wrong???
Thanks!

Sam,

You need to check the field's "FieldSize" property. If it is set to Integer
or Long Integer it won't allow you to store numbers with decimal portion.
That's what was suggested by Rick and Lynn earlier on this thread. You
should try the Currency data type.
 
L

Lynn Trapp

Unfortunately, Access refers to the datatype as Number and the FIELD SIZE as
"Long Integer," "Single," "Double," etc. These are the actual datatypes. You
need to change the Field Size to either Single, Double, or Currency to get
what you want.
 

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