constant decimal places

G

Guest

Numbers on my report occasionally change. For example, in my form I type 253.75. When I print the report the number shows 253.76. When looking at the query, in datasheet view, the number shows 253.75 however when I click the field, the number shows a third decimal place 253.756. If I only typed two decimal places, where did the third decimal place come from? Originally, on the table, my field was a Currency type with two decimal places. I then changed it to a Number type, Double field size, Currency format with two decimal places. Either way, my number STILL changes. This doesn't happen with every number I type in, only occasionally. I tried the Round function, however it didn’t work either. =Round(([Recovery Amount]),2). I’m wondering if my formatting is incorrect.
 
M

Mark

Dana,

First, are you multiplying fields together for your
report? Second, if your Amount field should only contain
two decimal places, I recommend using an update query and
the round function to update your base table. If you
increase the number of decimal places in the field, you
should be able to see if the data has only two decimal
places. Third consider using an Input Mask when entering
data.

Mark
-----Original Message-----
Numbers on my report occasionally change. For example,
in my form I type 253.75. When I print the report the
number shows 253.76. When looking at the query, in
datasheet view, the number shows 253.75 however when I
click the field, the number shows a third decimal place
253.756. If I only typed two decimal places, where did
the third decimal place come from? Originally, on the
table, my field was a Currency type with two decimal
places. I then changed it to a Number type, Double field
size, Currency format with two decimal places. Either
way, my number STILL changes. This doesn't happen with
every number I type in, only occasionally. I tried the
Round function, however it didnâ?Tt work either. =Round
(([Recovery Amount]),2). Iâ?Tm wondering if my formatting
is incorrect.
 
N

Nunya

You're experiencing a natural effect of how floating-point data types such
as Double and Single are handled in binary. They're precise (handle lots of
decimal places without requiring much storage), but not necessarily
accurate -- they store approximations of a number.

Decimal and currency store exact representations of the number. For
decimal, set the precision (total number of digits) and scale (number of
decimal places) properties for the field. Most of my work requires reliable
accuracy (e.g., dollar amounts, fractions of seconds, etc., that reconcile
exactly), so I avoid the floating point types.


Dana said:
Numbers on my report occasionally change. For example, in my form I type
253.75. When I print the report the number shows 253.76. When looking at
the query, in datasheet view, the number shows 253.75 however when I click
the field, the number shows a third decimal place 253.756. If I only typed
two decimal places, where did the third decimal place come from?
Originally, on the table, my field was a Currency type with two decimal
places. I then changed it to a Number type, Double field size, Currency
format with two decimal places. Either way, my number STILL changes. This
doesn't happen with every number I type in, only occasionally. I tried the
Round function, however it didn't work either. =Round(([Recovery
Amount]),2). I'm wondering if my formatting is incorrect.
 

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