Let's be clear. By default, Access shows you what is in the field. If you open the table and look at that value in Datasheet view, is it 2.8 or 3 ?
Rounding occurs when the data type of the field in the table doesn't support the precision you request. ANY of the integer types will do this, including LONG and INTEGER (a.k.a. WORD) data types. If the data type in the table is not SINGLE, DOUBLE, CURRENCY, or DECIMAL then you cannot have decimal points anyway. However, one can find general advice to avoid using DECIMAL anyway because of its issues in data handling.
Let's be clear. By default, Access shows you what is in the field. If you open the table and look at that value in Datasheet view, is it 2.8 or 3 ?
Rounding occurs when the data type of the field in the table doesn't support the precision you request. ANY of the integer types will do this, including LONG and INTEGER (a.k.a. WORD) data types. If the data type in the table is not SINGLE, DOUBLE, CURRENCY, or DECIMAL then you cannot have decimal points anyway. However, one can find general advice to avoid using DECIMAL anyway because of its issues in data handling.
Yes, there is the problem. Bob Fitz's suggestion fixed you this time. For future reference, remember that the table in Datasheet view ALWAYS shows you the native format and accurate content of the field in question unless you have somehow adjusted the Datasheet View internal definitions - which is something even advanced Access user's don't do. So if there is EVER any question, the "true" display of your stored data is always found in the Datasheet view and is the first place to look to tell the difference between a data problem and a formatting problem.
Doc, If you format the data at the table level, that's what you see in DS view. So, if you have a single or double but set the format to show no decimal places, you'll see a rounded number. If you have a date field that sometimes contains time and you set the format to short date, you never see the time values but they are still there. This one got me good when I took over an app created by someone else. It was early in my Access career and I hadn't yet spent 20 years helping people solve stupid problems like this so it was two days before it occurred to me to look at the format in the table where I discovered the short date format and removed it. Voila. My query results now made sense.
This is why I NEVER EVER format at the table level. I followed this rule instinctively from the beginning in databases I created. No one told me but I knew I wanted to see the data as it was stored, not necessarily how it might be displayed in a form or report. But eventually I learned that my instincts were correct when I started encountering messes made by others. When I open the table in DS view, I want to see what is actually stored. Setting the format property interferes with that.
Forgot you could do that since it is something I knew to NOT do - because it cuts you off from important debugging information.
Thanks for the reminder, Pat.
When you understand data, you instinctively avoid formatting at the table level. That's why you forgot. You just don't do it. That's why when I ran into an app where someone had done it, it baffled me for two days.