Numbers in datasheet view expand on focus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

In my database i have an invoice amount that the field
properties is set to double standard and auto in the
invoice table.It is not needed to be in currency but my
problem is when i run query to select the records showing
invoice amount 3,505.31 on the datasheet view...when i try
to copy the number off ...the number expands to
3,505.31005859375 .The datasheet view will be used by
employees to copy and paste so i need the amount to stay
as 3,505.31...Please help!
 
Floating point numbers always have rounding errors.

Use a Currency type field in your table, as it stores 4 decimal places
precisely. Then when the values are assigned to the field, use the Round()
function to round to 2 places, so the last 2 places are zeros for all
records. Because the data is stored correctly, the sum of the values will
also be correct.
 
Back
Top