AcExportDelim or AcExportMerge having problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CD Tom
    Contributor
    • Feb 2009
    • 495

    AcExportDelim or AcExportMerge having problems

    I have tables that contain number fields set up as Double that have up to 4 decimal places ex: 0.07395. I do a backup of the data using the
    Code:
    Docmd.transfertext acExportDelim,,"Master", "c:\port\master.txt", true
    I've also tried the
    Code:
    Docmd.transfertext acExportMerge,,"Master","C:\port\master.txt", true
    they both work but the 4 Decimal fields only come across with 2 decimals. So when I restore the data using the
    Code:
    docmd.transfertext AcImportDelim,,"Master","c:\port\master.exe", true
    I loose two decimals.
    What do I need to do to fix this?
    Thanks
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3664

    #2
    I hate to say it, but I have had strange experiences with Doubles showing up with two decimal places when I only want one, but only when I export the numbers or use them in a query (with no format set).

    I assume "Master" is a Table? If it was a query, you could set the decimal places using hte Format() function, but if you have many fields, this query then becomes ugly--but it is doable....

    Comment

    • CD Tom
      Contributor
      • Feb 2009
      • 495

      #3
      Yes master is a table but I have three other tables that are doing the same thing. There has to be a way to export this data and them import it back with the same number of decimals.

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3664

        #4
        The only way I know how to export it is to have it as a field in a query and use the Format() function. It is kind of ridiculous that Access doesn't export based on the settings of the field....

        Comment

        • CD Tom
          Contributor
          • Feb 2009
          • 495

          #5
          I'll give that a try, thanks.

          Comment

          Working...