For a field in an Access 2013 database that I wanted to hold the amperage for a device's power adapter, e.g., 1.5, I specified the field should be a number with a "fixed" format. But whenever I put in 1.5, Access would change it to 2. I clicked on the button to increase the number of decimal points, but Access would round the number 1.5 to 2.0 then. To resolve the problem, I clicked on View for the table and selected Design View.
I could then see, when I selected the field that was to hold the amperage, that the Field Size value was set to Long Integer. An integer field, obviously, won't hold a fractional part for the number.
I set the value to Single instead by clicking in the field and selecting that option from the dropdown list, so I could store a floating point value in the field rather than an integer.
From the dropdown list for field size, you can select the following values:
Setting | Description |
Decimal precision | Storage size |
---|---|---|---|
Byte |
Stores numbers from 0 to 255 (no fractions). |
None |
1 byte |
Decimal |
Stores numbers from -10^38-1 through 10^38-1 (.adp) |
28 |
2 bytes |
Integer |
Stores numbers from -32,768 to 32,767 (no fractions). |
None |
2 bytes |
Long Integer |
(Default) Stores numbers from -2,147,483,648 to 2,147,483,647 (no fractions). |
None |
4 bytes |
Single |
Stores numbers from |
7 |
4 bytes |
Double |
Stores numbers from |
15 | 8 bytes |
Replication ID |
Globally unique identifier (GUID) |
N/A |
16 bytes |
Note: you can see the values that each one can hold by hitting the F1 key to get online help on the topic after clicking on the value stored in the Field Size field while in Design View.
When I switched back to Datasheet View by clicking on View and then selecting Datasheet View, I was then able to change the value from 2.0 to 1.5 and have it remain as 1.5, i.e., Access had stopped rounding numbers to the nearest integer for the field.
References: