Results 1 to 5 of 5
  1. #1
    ick64 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    22

    Importing new fields (and their data) into an existing table

    Hello all,



    I have a simple table with 04 fields and 2.700 records. Now I would like to add/import data related to 10 additional fields into those records.

    Is it possible? How can I do it?


    Thanks a lot!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    1. save the file (excel, or text) to a generic name everytime: File2import.txt or File2import.xls
    2. attach (link) the file as an external table, like tFile2Import
    3. make a query that appends data from tFile2Import table to the target table.
    this query would use * to import all fields with the same name, but if the 2 tables dont have the same names, you must add the source fields and target fields to the query.
    4. put this query in a macro, run the macro.

    Once this is done, the import steps are now:
    1. save the new file and overwrite the old one
    2. run the macro
    done.

    if you get new fields, simply edit the append query, save.
    (but if all fields in source and target are the same , theres no need to edit if you use the * )

  3. #3
    ick64 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    22
    Thank you ranman - I will try it and revert.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Is you current table normalized?
    Is your proposed new table with the additional fields normalized?
    Review this to avoid a structure problem.
    Good luck.

  5. #5
    ick64 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    22
    Hello all,

    Based on the comments above - and as I am just about to start using the data, I figured out I would better have a new table with the proper fields instead of adding fields to an existing table.

    Thanks for the input and comments!

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

Similar Threads

  1. Importing records into an existing table
    By Jamescdawson in forum Import/Export Data
    Replies: 8
    Last Post: 05-18-2015, 04:05 PM
  2. Replies: 1
    Last Post: 04-25-2015, 01:44 PM
  3. Replies: 1
    Last Post: 04-25-2015, 01:41 PM
  4. Importing Excel data to an existing table
    By tonyrhills in forum Import/Export Data
    Replies: 3
    Last Post: 12-23-2011, 09:19 AM
  5. Importing existing Autonumber fields
    By prophecym in forum Import/Export Data
    Replies: 3
    Last Post: 02-05-2011, 09:59 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