Results 1 to 8 of 8
  1. #1
    danaspps is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    14

    Add new columns and corresponding data to a table.

    Total newbie here. I have a table with 1137 records in it. I want to add several additional columns to the table. I have the data for those columns in an Excel spreadsheet. I need to know how to import that data into the existing table. I have a column in the Excel sheet that is the same as the primary key in the Access table.



    I greatly appreciate any help, but please dumb it down for the newbie.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    For starters, I'd want to be sure that adding columns was the correct solution. If you have product1, product2, etc, it's probably not. That said, you can link to the Excel file (External data tab) and then create a query that joins the 2 tables together on the key field. Then change that query to an update query, and update each Access field to the corresponding Excel field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    255
    Perhaps by attaching the excel file, with a minimum of data and replacing the sensitive ones, you would make it easier to understand the problem directly and therefore advise you on how to act.

  4. #4
    danaspps is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    14

    Excel file attached.

    I have attached the Excel file as requested. The table in the database has SKU as the primary key, so this would be adding information to existing records. The database is to large to attach.
    Attached Files Attached Files

  5. #5
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    255
    What is the action you should do just to add new SKUs or also update existing SKUs?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    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.

  7. #7
    danaspps is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    14
    I decided to go a different way and just created a separate table and form for this information. At least this way I know what I am doing. I appreciate those of you who read my post and tried to help. I assume I should close out this thread somehow but not sure that marking it as solved is appropriate.

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,906
    At least this way I know what I am doing
    Always the best path to take
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 9
    Last Post: 09-27-2022, 07:24 AM
  2. Replies: 3
    Last Post: 05-30-2019, 08:19 AM
  3. How to summarise data on table with different columns
    By alvinbasilio0904 in forum Queries
    Replies: 1
    Last Post: 12-06-2018, 09:40 AM
  4. Replies: 2
    Last Post: 10-26-2015, 06:14 AM
  5. Replies: 1
    Last Post: 08-28-2013, 07:40 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