How do I get Access to append the exact amount with decimals?

A

aperez72

When I append data from a query to a table, the amount field which is
currency with two decimals appends on the table as a rounded number with now
decimal places. I have also set the amount field on the table which I"m
appending to format of currency with two decimal places.
 
J

John W. Vinson

When I append data from a query to a table, the amount field which is
currency with two decimals appends on the table as a rounded number with now
decimal places. I have also set the amount field on the table which I"m
appending to format of currency with two decimal places.

It appears that your Table has a field with the default Number datatype - Long
Integer. An Integer is by definition a whole number, with no decimal places.

If the field is designed to store currency type data, change its datatype from
Number to Currency. There are several subtypes of Number (some of which can
handle decimals), but oddly enough Currency is a separate datatype (it's on
the dropdown along with Date/Time, Text, Yes/No and so on). It will store
exactly four decimals, no more and no fewer; you can set its Format property
to display only the first two, but be careful if you do so; you may need to
use the Round() function to store only two.
 
R

Rob Parker

I suspect that the datatype for the field in the table is one of the integer
number datatypes (eg. Integer or Long Integer). If it's a Number datatype,
it must be either single or Double. Or, if you're storing monetary values,
it should be Currency datatype.

The datatype and the field format are not the same thing. You can display
(format) an integer number with two decimal places, but since it is, by
definition, an integer, the values can only be whole numbers.

HTH,

Rob
 

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