Results 1 to 7 of 7
  1. #1
    davetheant is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    6

    Importing file names into a table?

    Hello everyone. I am trying to have Access 'read' the names of the files in a directory into a table that I have. I think this is possible with VBA code, but I don't know how to make the code put the data into my table. Any help is appreciated.

  2. #2
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    The second post in the below link seems to offer a solution (I have not done this before):

    http://www.dbforums.com/microsoft-ac...ess-table.html

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    And here's a link that might also provide some ideas for you: http://allenbrowne.com/ser-59.html

  4. #4
    davetheant is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    6
    Thanks for the response; that's exactly what I'm trying to do, however nowhere in that thread does it tell what to do with the data from the Dir() command. I just want to make each filename have its own row in my table.

  5. #5
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    I typed "Access VBA Dir()" into Bing and it returned lots of good sites. As I said I have never used Dir() but it appears to just return a string containing the path and file/folder name.

    The site RuralGuy mentions looks good also (in case you missed his post).

  6. #6
    davetheant is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    6
    Thanks everyone I got it!

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's great! Care to share your solution with the others that read this Forum?

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

Similar Threads

  1. Import File Names
    By cassidym in forum Import/Export Data
    Replies: 3
    Last Post: 01-11-2011, 03:19 PM
  2. Verify CSV Field Names Before Importing
    By johnson in forum Import/Export Data
    Replies: 2
    Last Post: 01-26-2010, 06:53 PM
  3. Importing text file into Access Table
    By Anthony in forum Import/Export Data
    Replies: 13
    Last Post: 09-23-2009, 04:47 PM
  4. Importing Txt file via Vb
    By jquickuk in forum Import/Export Data
    Replies: 1
    Last Post: 04-01-2009, 08:27 AM
  5. Importing a tab delimited file into access table - please he
    By championss in forum Import/Export Data
    Replies: 0
    Last Post: 10-29-2006, 02:33 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