Results 1 to 4 of 4
  1. #1
    PJ Crittenden is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2014
    Posts
    22

    Need to import .txt file using the extension only.

    I'm using a macro, TransferText and I want it grab whatever text file is in that folder. I've tried \*.txt but get a message that the database engine could not find *.txt. If I type in the complete name, it works...but I don't want to always retype the file name.



    I also want to move the file once it's imported into Access, and I created a module that copies the file to the new folder, but the file is still in the original folder as well. I need to delete it as part of the process. Can you help with that too?

    Thanks.

  2. #2
    PJ Crittenden is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2014
    Posts
    22
    I got the "delete" part figured out. Still need help with importing a .txt file without typing the entire file name.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps the solution is to use VBA

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I agree with itsme, vba is the solution here.

    Look at filesystemobject commands to handle file/folder manipulation

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

Similar Threads

  1. Replies: 1
    Last Post: 03-18-2014, 05:16 PM
  2. Pulling data from text file with custom extension
    By dep999 in forum Import/Export Data
    Replies: 7
    Last Post: 02-07-2014, 01:28 PM
  3. Replies: 5
    Last Post: 11-18-2012, 05:12 PM
  4. how to display the extension file access 2007
    By tintincute in forum Access
    Replies: 4
    Last Post: 08-04-2010, 10:09 AM
  5. access file extension help
    By supertech33 in forum Access
    Replies: 2
    Last Post: 02-17-2010, 03:31 PM

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