-1

I'm trying to import some txt files from a folder but i can't find out what the command is to import all files that are in a folder.

DoCmd.TransferText acImportDelim, , "tab1", "C:\example", True

thats my code..

Does anyone know that?

(Sorry, I'm very new to VBA).

EDIT :

This question is Irelevant and does not have a purpose anymore! it was an internal script mistake!

kint
  • 13
  • 2
  • 9

1 Answers1

2

As usual, the solution to solving a complex problem is to split it into simple problems:

  1. Loop through all the *.txt files in the folder (the second, highest-voted answer shows how to use wildcards).

  2. Import the file (you already have code for that).

Heinzi
  • 167,459
  • 57
  • 363
  • 519