Stop numbers from Rounding

N

NealJH

How do you stop numbers from rounding to whole numbers in Access 2003.

Thanks

NealJH
 
F

fredg

How do you stop numbers from rounding to whole numbers in Access 2003.

Thanks

NealJH

What is the Field Size property of the field?
If it is Integer or Long Integer, by definition Integers are whole
numbers and cannot have a decimal value.
Change the field size to Single or Double.
 
F

fredg

I have set the field to decimal, single and double, and the number still
rounds.

Then you need to give a bit more information.

In the Table Design View...
What is the field's actual Datatype now?
If the above is Number datatype, what is the field's current Field
Size property?
What is the field's Decimal Places property set to?
What is the field's Format property?

In Form design view...
Ditto all the above.
In the control's property sheet's Event tab, is there any event
coding that would change the entered value?

How about an example of what is entered in the form and what is saved
in the table.
 
N

NealJH

Table Design
Fields data type is number
Number data type field size is double
Decimal place is 2
format property is General #


Form Design
There is no event coding
Format is General #
Decimal place is 2

Thanks

NealJH
 
F

fredg

Table Design
Fields data type is number
Number data type field size is double
Decimal place is 2
format property is General #

Form Design
There is no event coding
Format is General #
Decimal place is 2

Thanks

NealJH
** snipped **

Nothing I see in what you have posted should make a field round to a
whole number.

As a test, add a new UNBOUND control to your form.
Set it's control source to:
=[FieldName]
Include the = sign (do not select the FieldName from the control
source drop-down box, nor from the Field List).
Verify that the Control name is not the same as the FieldName.

Enter a value with a decimal, i.e. 123.75. Try several different
number values in several different records. Include the numbers you
know to have been incorrectly rounded. In the form control, does it
round to 124? or is it now correct @ 123.75?

Next check the table. Is it correct in the table? If it's correct on
the form, and incorrect in the table, the difficulty is in the table.

I would add a new field to the table.
Set the new field to Number, Field Size Decimal. Set the Decimal
Places to 2. Do not enter any format.
Enter some numbers directly in this new field in the table. Is it OK?
Then add a format to the field. Is it OK now?
If so, delete the old control from the table. Change the name of this
field to that of the old field. Delete the old FieldName control from
the Form and then use the Field List to add this new table field onto
your form. Try it now.
Lastly, delete the test control you added.
 
Top