Results 1 to 3 of 3
  1. #1
    Mikey1987 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    19

    My import spec skips first record

    Hello,



    I made an import script that I use to automatically upload 6000 text files into access 365.
    However, the import script always skips the first record of my file (there is no title row, the first row is already data).

    I read something about the MSysIMEXSpecs table, but I can't figure out how to open it, + I'm not sure that's my problem.
    Does anyone know how to force access to also take import the first row of data?

    Thanks in advance,
    Mikey

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    There is typically a box (in 2003,.. 2010) that can be checked to indicate FirstRow Contains Field Names. If it isn't checked, I would expect data in the first row???

    Click image for larger version. 

Name:	ImportStuff.jpg 
Views:	14 
Size:	43.2 KB 
ID:	22834

  3. #3
    Mikey1987 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    19
    Edit2: before you read the rest . My importscript had "FirstRow Contains Field Names" ticked off. However, in the syntax of my import script, I had the field names on "TRUE".
    so the DoCmd.TransferText acImport ...... part, had the final part on TRUE, this had to be FALSE. Me so silly :'(

    Hello Orange,

    Thank you for your reply, but I had in fact "First row contains field names" ticked off.
    That having said, I found the issue. I'll post it here in case it helps someone.

    Not sure what I'm doing, but this works:

    go to File --> Options --> Access Database --> Navigation and click on the "Navigation Options..." button
    There, tick the box "Show System Objects" and restart access.
    When you reopen access, you should have all kind of tables below your "normal" tables. Open the MSysIMEXSpecs file (the one below the table that your import is populating).

    Find the field "StartRow" and put that to "-1"
    All the forums I read suggested to put that number on 0, but that didn't work for me. -1 did work (clueless as to why that is, but it works )

    Edit: it might have to do with the fact that my import script also creates the table itself? I first wrote an "append" import script, but for some reason that gave me an error. The create new database method worked flawlessly

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculating st.dev of a data set that skips dates
    By redpringles in forum Access
    Replies: 3
    Last Post: 05-21-2014, 10:24 AM
  2. Code skips over certain steps
    By mejia.j88 in forum Programming
    Replies: 8
    Last Post: 03-03-2014, 01:55 PM
  3. Import spec saved
    By crowegreg in forum Import/Export Data
    Replies: 6
    Last Post: 02-17-2014, 04:11 PM
  4. Import spec for importing Excel2010 into Access 2010
    By crowegreg in forum Import/Export Data
    Replies: 0
    Last Post: 08-02-2013, 12:18 PM
  5. Choose Import Spec from option group
    By thart21 in forum Import/Export Data
    Replies: 4
    Last Post: 06-29-2011, 10:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums