+ Reply to Thread
Results 1 to 4 of 4

Importing CSV files to Access 2007 - 15+ digit issue!

  1. #1
    Registered User
    Join Date
    02-25-2015
    Location
    Birmingham, England
    MS-Off Ver
    MS Office 2010
    Posts
    29

    Importing CSV files to Access 2007 - 15+ digit issue!

    Hi,

    Every month I receive multiple csv files that I need to import into an access database. Once I receive them, I have to run a macro which changes some detail in the csv files and then saves and closes it.

    My problem is that in one of the columns there are numbers which are longer than 15 digits which are perfectly formatted when I receive the CSV's but after running the macro (which opens, changes some numbers and then closes and saves as a csv) the digits are formatted with 0's after the 5th digit! ANNOYING!

    I want to know the best way to avoid this. Any ideas???

    NB: I need to keep the files in CSV as access likes to chuck out lots of data when importing a normal xls file.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Importing CSV files to Access 2007 - 15+ digit issue!

    Not seeing the macro it's not easy to give exact cure for the problem, but diagnosis stage is easy. Numbers, if not explicite given type, are generally stored as double precision floating point numbers. This means that only some 15-16 meaningful digits can be stored. And this is what you probably face.

    Yes, it is annoying for instance in case of bank account numbers - they are often pretty long (in Poland - 26 digits).

    First general idea of treatment: try to keep data as text type (string). If numbers manipulation is needed, convert to number for the time of te operation only this part of data, but store the result back as text.

    That shall do the trick.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    02-25-2015
    Location
    Birmingham, England
    MS-Off Ver
    MS Office 2010
    Posts
    29
    Quote Originally Posted by Kaper View Post
    Not seeing the macro it's not easy to give exact cure for the problem, but diagnosis stage is easy. Numbers, if not explicite given type, are generally stored as double precision floating point numbers. This means that only some 15-16 meaningful digits can be stored. And this is what you probably face.

    Yes, it is annoying for instance in case of bank account numbers - they are often pretty long (in Poland - 26 digits).

    First general idea of treatment: try to keep data as text type (string). If numbers manipulation is needed, convert to number for the time of te operation only this part of data, but store the result back as text.

    That shall do the trick.
    Thanks for the reply.

    I was told when you change it to text and import it into access some of the queries in the database don't work and I get "expression match type" errors when running some of the queries.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Importing CSV files to Access 2007 - 15+ digit issue!

    You wrote about "15 digit and zeros" in output CSV. How do they look while in Access?
    Unfortunately I expect problem already here, when Access retrieves data from CSV.
    I don't know who told you about queries not working with texts (quite possible, that it's the truth for the queries you have now). So they shall be told that redesigning queries is required. otherwise you loose important information.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Importing latest entry from a field in Access 2007 into Excel 2007
    By swerider in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-29-2013, 11:53 AM
  2. Importing Multiple Excel Files Into Access
    By Orangeworker in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2012, 01:04 AM
  3. Date Format Issue: Importing data into Excel 2007
    By harribry in forum Excel General
    Replies: 1
    Last Post: 08-18-2011, 11:17 AM
  4. Excel 2007 : Importing Access 2007 query to Excel 2007
    By Gsander3 in forum Excel General
    Replies: 1
    Last Post: 03-19-2011, 10:40 PM
  5. Importing access table issue
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2010, 08:28 AM
  6. Importing CSV into Access 2007
    By extrapulp in forum Access Tables & Databases
    Replies: 5
    Last Post: 02-10-2010, 09:15 AM
  7. [SOLVED] Importing Access Files
    By Mike Busch in forum Excel General
    Replies: 0
    Last Post: 03-14-2006, 11:25 AM
  8. Importing from Access issue
    By truss in forum Excel General
    Replies: 1
    Last Post: 05-20-2005, 10:06 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1