Results 1 to 5 of 5
  1. #1
    Nikh is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    19

    How to Import only New records from Excel to Access using VBA code in MS access

    Hi.

    I am looking to upload Excel file into MS access table but i want to upload only new recrods i.e (already existing records not upload).


    Thanks,
    Nikh

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    if you have a primary key in your table and it exists in your excel file then it won't be imported since duplicates are not allowed

  3. #3
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Or else you can make it a 2-step process: first import the entire file and then run an unmatched/append query.

  4. #4
    Nikh is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    19
    I dont have primary key in table then how can i upload file and only import new records into access table using vba code....

    is there any code you have ..pls provide me..

    Thanks,
    Nitesh

  5. #5
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Use the query wizard for unmatched, then change it into an append query.

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

Similar Threads

  1. Replies: 11
    Last Post: 04-27-2017, 05:16 PM
  2. VBA code import and Add record from excel to MS access
    By darkdarkwt in forum Import/Export Data
    Replies: 2
    Last Post: 07-20-2015, 02:23 AM
  3. Replies: 3
    Last Post: 10-08-2014, 11:05 AM
  4. Replies: 10
    Last Post: 06-16-2014, 08:37 AM
  5. Replies: 7
    Last Post: 05-09-2012, 06:06 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