Results 1 to 10 of 10
  1. #1
    sdc1234 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    89

    Import Append


    Greetings, I am trying to append records that do not exist already in my database: ex: I have 2013 files and 2014 files, rather than purge and append both files I would like to just append the records that does not exist.. any help would be appreciated..


    v/r
    novice

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Are these files Access databases? Does each have tables that are related by autonumber primary key? Merging tables with autonumber related records is not a simple exercise.

    Build a find unmatched query to discover records that are in one table but not other.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    sdc1234 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    89
    unfortunately they are excel files that I am importing each week... instead of putting the records in one file which in my mind would be a whole lot easier, they decided to go with 2 files and I already have the 2014 uploaded and I need to upload 2013 files now instead of purging both files they want me to just append the new records that do not exist in the 2014 load, without massaging the raw data.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    I usu save my excel file (to import) to the same filename every time (import.xls)
    This xls is linked to the db as tbl: xlImport
    The macro to import appends the data from the xlImport tbl to the data table via the action: TRANSFERSPREADSHEET
    This way the macro imports the same file everytime, only the data in the XL file changes. Save excel file, run macro, done!

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    The 2014 file could have records that were also in the 2013 file but not necessarily all of them? If there is no overlap of records, just import the 2013 file.

    Can you set link to the 2013 file? Then do find unmatched query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    sdc1234 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    89
    Quote Originally Posted by June7 View Post
    The 2014 file could have records that were also in the 2013 file but not necessarily all of them? If there is no overlap of records, just import the 2013 file.

    Can you set link to the 2013 file? Then do find unmatched query.

    hey guys thanks for the input, June, i have a question, the 2013 version is different than the 2014 version does this mean I am going to have to make 2 seperate tables, it really bugs me that they change the version every other week, they do not understand data integrity and consistancy....

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You mean 'they' keep changing the column headers in Excel? Who are 'they'?

    Names don't have to be the same but it means you will have to reconstruct the queries every time you need to run this process.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    sdc1234 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    89
    yes they keep on changing and adding headers to excel file: example: 2013 has 9 headers, last week 2014 had 12 headers now today it has 14, these are people in from the other coast where I am getting my input from...

  9. #9
    sdc1234 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    89
    Is there a way to set my headers up when linking to an excel spreadsheet, when I link the file the headers come up as F1, F2, etc with the actual headers below it...

    v/r

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I think there is option in the import/link wizard to specify the Excel does not have a header row. Try it - what happens?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-13-2014, 05:30 PM
  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. Access 2003: Import & Append New data
    By compooper in forum Programming
    Replies: 2
    Last Post: 06-22-2011, 08:44 AM
  5. Excel Import/Append Data (weekly)
    By MartinL in forum Import/Export Data
    Replies: 1
    Last Post: 08-12-2010, 06:14 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