Results 1 to 3 of 3
  1. #1
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183

    CSV Import to multiple tables

    How in the WORLD do I import a CSV file where data has to go to two tables. Also, one of the fields in the CSV is a text and in the table it's a reference to the lookup. So, while I'm importing IE - "beans" the table will stores it as it's ID - IE: 2



    Here are the actual CSV names:
    USER_ID FIRST LAST EMAIL PHONE SOURCE IP ADDRESS

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    save the csv file to a generic name every time, c:\folder\file2import.csv
    link this file as a table
    make 2 queries to import the data into the target tables.
    put the 2 queries into a macro, mImportCsv

    the steps will be:
    1. save new csv and overwrite c:\folder\file2import.csv
    2. run macro
    done.

  3. #3
    dniezby is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Apr 2013
    Posts
    183
    Quote Originally Posted by ranman256 View Post
    save the csv file to a generic name every time, c:\folder\file2import.csv
    link this file as a table
    make 2 queries to import the data into the target tables.
    put the 2 queries into a macro, mImportCsv

    the steps will be:
    1. save new csv and overwrite c:\folder\file2import.csv
    2. run macro
    done.
    Okay, the only thing I understood in that reply was - Save the file. LOL. Sorry, too new to programing Access.

    Actually, I understand the create a query part too. Just don't know how to write one for this situation or a macro.

    The steps sound logical. I'm sure once I figure out the other parts, I can just assign the two actions to a button?

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

Similar Threads

  1. import ot multiple linked tables
    By Jen0dorf in forum Access
    Replies: 6
    Last Post: 02-05-2016, 07:14 AM
  2. Replies: 1
    Last Post: 08-25-2012, 06:11 PM
  3. Import multiple txt tables
    By webisti in forum Access
    Replies: 3
    Last Post: 03-13-2012, 08:44 AM
  4. Automate import into multiple Access tables
    By mcchung52 in forum Import/Export Data
    Replies: 5
    Last Post: 01-26-2012, 05:33 PM
  5. Import multiple files from one location to new tables
    By shmalex007 in forum Import/Export Data
    Replies: 1
    Last Post: 01-05-2012, 03:49 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