Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2014

    Unanswered: Unwanted rounding with large decimals

    I am successfully importing into an Access table with no errors, a fixed position text file. One of the fields on the file and which gets populated to the table represents a currency value with two decimal places; and whose range can reach the quadrillions. i.e -9,999,999,999,999,999.99 through +9,999,999,999,999,999.99. I have tried several different numeric decimal/format/size combinations that I can think of (including "double"), and I am getting unwanted rounding. But the unwanted rounding only occurs when the value extends into the 10 trillions. Furthermore, the problem only happens when I do an automated import using a pre-defined import specification. It does not happen when I cut and paste the value directly from my text file.

    For example: -8,888,888,888,777.77 will get successfully imported without any rounding.
    However, -88,888,888,888,777.77 during the import will get rounded to: -88,888,888,888,777.80.
    But if I cut and paste the same "-88,888,888,888,777.77" value directly from my text file into the access table, it will not get rounded.
    Assistance on this matter will be greatly appreciated.

  2. #2
    Join Date
    May 2004
    New York State
    Unfortunately, according to the Access Help file (ver. 2003), the Currency field length is only accurate to 15.4 digits (15 digits to the left of the decimal, 4 digits to the right). If you need 17.2 digits, you need to try something else, maybe double. Newer versions may be different, however.

    In any event, in the scenario you present, you might make sure that the import spec also is Currency and not simply Numeric.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts