Results 1 to 5 of 5
  1. #1
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128

    Repeatedly import files. Should I use the same file name?

    Hi, I will be consistently importing new data into my db. But I'd prefer to have the file name to import be different to reflect what data actually gets changed. And just as obviously want to save the import steps so I'm not constantly changing the format of the fields. Is there a way to do this as a saved import?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I've never use Saved Import Specification.

    Review http://www.accessmvp.com/KDSnell/EXCEL_MainPage.htm
    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
    crobaseball is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    128
    Never mind. Under the saved imports, you can click on the file path and change it as needed. Tho certainly handling this as VBA or SQL is prob better

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by crobaseball View Post
    ... Is there a way to do this as a saved import?
    I use saved import procedures for text files. I don't know if there is a new fangled way to save import procedures for .xlsx files. Here is an example for fixed width text. Also, csv is just a text file so I don't think of them as Excel files or worksheets.

    Code:
     DoCmd.TransferText acImportFixed, "ProcedureName", _
       "tblMyTable", strPath & strFilename
    EDIT: Also, you can import your named and saved import procedures from one DB file to another DB file using advanced options via the Wizard.

  5. #5
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    If you create a linked table to a generically named file (.csv, .xlsx, whatever) in a default location - lets say for the purposes of this explanation that name is importdata.csv

    1. copy your .xlsx file to a default location and name as importdata.csv (so you still have the original named whatever and wherever)
    2. create a linked table to importdata.csv
    3. create an append/update query as required to transfer data from the linked table to your db table (could have multiple queries if several tables to be updated)
    4. run the query(s)

    so next time....
    1. repeat step 1 - replacing the existing importdata.csv
    2. repeat step 4
    ...job done

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

Similar Threads

  1. Replies: 10
    Last Post: 06-16-2014, 08:37 AM
  2. Replies: 7
    Last Post: 11-20-2012, 05:08 PM
  3. Replies: 2
    Last Post: 01-26-2012, 12:19 PM
  4. Replies: 4
    Last Post: 07-15-2010, 05:58 PM
  5. no option to import xls file or option all files
    By captgnvr in forum Import/Export Data
    Replies: 3
    Last Post: 09-22-2009, 10:19 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