Importing a .txt file using VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
DoCmd.TransferText acImportFixed, "Toll Free Call Manager", R1,
inputbox("Enter File Name"), False
 
Back
Top