Results 1 to 4 of 4
  1. #1
    kdbailey is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    228

    Appending External Text File to Table w/ Primary Key

    I have a table that contains a primary key and I am trying to append records from a text file. When I go to append the records, it tell me that XXX amount of records were lost due to key violations. Can anybody explain why this is happening? Shouldn't access be able to figure out how to create new ID's on newly appended data?



    Access 2007

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    If your primary key is a field in the text then you have duplicates and it wont apd.
    If your primary key is an autonumber then you have other INDEXED fields in the table and the text has duplicates.

  3. #3
    kdbailey is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    228
    It is an access-provided auto number. But the table is empty.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by kdbailey View Post
    ... XXX amount of records were lost due to key violations...
    You may be able to glean some insight by looking at the new table created by Access, paste errors.

    Perhaps a temp table can be created where all of its columns are of data type text and no fields are Indexed. Then, you can do data validation as you bring the records from your temp table to their permanent home.

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

Similar Threads

  1. External File Pointing Problem
    By justphilip2003 in forum Access
    Replies: 7
    Last Post: 03-25-2013, 10:29 PM
  2. Update Table Based on External File
    By 2tMonte in forum Import/Export Data
    Replies: 6
    Last Post: 02-05-2013, 07:20 PM
  3. Replies: 2
    Last Post: 12-27-2012, 09:37 AM
  4. Exporting Attachments to an external file
    By springa in forum Import/Export Data
    Replies: 3
    Last Post: 07-17-2011, 05:33 AM
  5. Appending a table with external script
    By farva in forum Import/Export Data
    Replies: 0
    Last Post: 11-09-2009, 12:12 PM

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