Automatic Number Rounding

J

JMunderpar

Hello everyone, Happy New Year.
I am coding a form that sets the value of a text box based
on the value selected from a combo box. If the user
selects the letter 'A' the corresponding text box value is
set to the number '1.5'. For some reason this number
automatically rounds to 2. Even if I go to the text box
manually and type in 1.5 it still changes to 2. I have
changed every setting I could think of to no avail. There
has to be some simple fix for this that I can't seem to
find. Please help...Thanks...JM
 
F

fredg

JMunderpar said:
Hello everyone, Happy New Year.
I am coding a form that sets the value of a text box based
on the value selected from a combo box. If the user
selects the letter 'A' the corresponding text box value is
set to the number '1.5'. For some reason this number
automatically rounds to 2. Even if I go to the text box
manually and type in 1.5 it still changes to 2. I have
changed every setting I could think of to no avail. There
has to be some simple fix for this that I can't seem to
find. Please help...Thanks...JM

The field is set to Number Datatype, but Integer size.
An Integer, by definition, cannot contain a decimal value.
In Table Design View, change the Field to Single, Double, or Currency,
depending upon what your requirements are. While there, also set the
field's Decimals property and the Format property if needed.
 
J

Jim Kennedy

Assuming the text box is 'bound', check the data type of
the in the underlying table...make sure it's not set to
integer or long.
 

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