Results 1 to 2 of 2
  1. #1
    joelelijo is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    1

    Key Violation: Excel Import

    When I import data into a table from an excel spreadsheet I receive the following error message:

    "1 record was lost due to key violations."



    -The primary key is the date. The record I am importing has a unique date.
    -Column headings match field names.

    What could be the problem?
    Thanks.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    It sure sounds like there are two rows with the same date in Excel. Or there is already a row in the Access table with the same date as a row in Excel.

    There should be a table in Access named "Import Errors" (or something like that) that will have the row number that caused the error. Find the record to get the date. Look for duplicate dates.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-14-2012, 04:40 PM
  2. Import table primary key violation
    By Doreen in forum Access
    Replies: 8
    Last Post: 12-18-2011, 07:05 PM
  3. Excel Import
    By jesleon in forum Import/Export Data
    Replies: 4
    Last Post: 08-24-2010, 07:32 AM
  4. Import Excel with SQL - again
    By tpcervelo in forum Queries
    Replies: 1
    Last Post: 08-06-2010, 08:13 PM
  5. VBA to open excel, import on close of excel
    By bdaniel in forum Programming
    Replies: 0
    Last Post: 03-20-2010, 02:45 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