Automatic Number Rounding

  • Thread starter Thread starter JMunderpar
  • Start date Start date
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
 
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.
 
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.
 
Back
Top