Importing a .txt file using VBA

R

RM @ MCI

I have used the code below to import a text file to my Access 2003 database. I would like to give the user the option of selecting the text file (and location of that file) in which to import. The code below has a static file name and file location. Thanks in advance for any assistance

DoCmd.TransferText acImportFixed, "Toll Free Call Manager", R1, "F:\TF_IMPORT.txt", Fals
*R1 is the name of the table which the user has created earlier in the process.
 
A

Alex Ivanov

DoCmd.TransferText acImportFixed, "Toll Free Call Manager", R1,
inputbox("Enter File Name"), False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top