Question About Importing Using VBA (DoCmd.TransferText)

  • Thread starter Thread starter Debris
  • Start date Start date
D

Debris

Hello,

I want to write a routine to import a text file into a Access desktop
application. However, I don't download to the same file each month (I
date-stamp the filename data-YYMMDD.txt).

Looks like DoCmd.TransferText is what I want, so my question is, if I don't
specify a file name and path in the code, will Access open a Windows "Open
File" box for me to point to the file, or do I need additional code?

Hope this is the right group to post this question.

Thanks,
D
 
You can incorporate code that will open a browser window for you. See the
code here:
http://www.mvps.org/access/api/api0001.htm

You would use the above code to get the path and filename of the file that
you want to open, put that into a variable, and use that variable in the
argument for filename in TransferText.
 
Back
Top