Results 1 to 8 of 8
  1. #1
    mduplantis is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2010
    Location
    Omaha, Ne
    Posts
    65

    Import Excel Access - Primary Key - Append table

    Hi,



    I am familiar with importing Access, but I am getting an error with the process of adding new employee phone numbers.


    • My Access tables uses a the employee number as its primary key.
    • I have a new field in my access table called employee phone number.
    • I have an Excel worksheet that contains the employee number and employee phone number as columns
    • All heading match and all data types are the same


    My goal is to populate the new employee phone numbers for each employee number in my access table.

    Is this possible using the import function of Acess? Or is there a different approach for appending a record?

    Thank you.

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You aren't appending records, you are trying to update existing records.

    What is the error that you are getting?

  3. #3
    mduplantis is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2010
    Location
    Omaha, Ne
    Posts
    65
    Hello,

    Yes, updating existing records. It tells me the records were lost due to KEY VIOLATIONS.

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    That error is usually connected to APPEND queries, make sure yours is an update query.

  5. #5
    mduplantis is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2010
    Location
    Omaha, Ne
    Posts
    65
    I was using the import menu from Excel in the Access menu bar. Is there a different way to update the table?

  6. #6
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You need to first import the file and then run an update query - two separate processes.

  7. #7
    mduplantis is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2010
    Location
    Omaha, Ne
    Posts
    65
    I will give that a shot. Thanks

  8. #8
    mduplantis is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2010
    Location
    Omaha, Ne
    Posts
    65
    That worked!! Thanks for the help. Greatly appreciated!

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

Similar Threads

  1. Duplicate Lines in Excel Import Mess up Primary Key
    By accessdave84 in forum Import/Export Data
    Replies: 2
    Last Post: 03-25-2015, 07:03 AM
  2. Import and Append Daily Excel Spreadsheets
    By JayRab in forum Access
    Replies: 13
    Last Post: 01-10-2014, 07:00 PM
  3. import table to append to a table in Access 2010
    By Stephanie53 in forum Forms
    Replies: 2
    Last Post: 05-23-2013, 03:40 PM
  4. Primary Key Auto Number not available in Excel for import
    By justphilip2003 in forum Import/Export Data
    Replies: 1
    Last Post: 04-30-2013, 07:52 PM
  5. Replies: 4
    Last Post: 12-17-2012, 01:21 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