Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    5

    Unanswered: first line in csv file

    Hallo!
    Iím trying to import a csv-file to Access2k through VBA. I have the problem that itís just ignoring the first line, regardless if I say that it contains field names or not. Iím using the specifications āImportSpecí und the code:
    DoCmd.TransferText acImportDelim, "ImportSpec", "tblImport", fname, False
    Then with HasFieldNames = false!
    Iím using a file with 20684 lines, but I get only 20683 imported.
    Does anybody have an idea why it doesnít work?

  2. #2
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    I dont have an idea but have you thought of moving your records down one line (insert a new one at the top)? and see if it still grabs one less?

    If it grabs all of them then I think there would be something in your code that needs to change. (I dont know what it would be but maybe someone could help).

    Wish I could help,
    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  3. #3
    Join Date
    Apr 2004
    Posts
    5
    Well, if I insert an empty line at the top, it will import everything ok, ignoring this empty one.
    This cannot be the solution though because it should all work automatically without the user having to do some changes in the csv files.

    Originally posted by JSThePatriot
    I dont have an idea but have you thought of moving your records down one line (insert a new one at the top)? and see if it still grabs one less?

    If it grabs all of them then I think there would be something in your code that needs to change. (I dont know what it would be but maybe someone could help).

    Wish I could help,
    JS

Posting Permissions

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