TransferText command - any help appreciated!!!

  • Thread starter Thread starter ac512
  • Start date Start date
A

ac512

Hello

I am using access 2007, and every month I have around 200 csv files that I
have to load into a table in my database.
In the past, I have used the TransferText command to automatically upload a
single file into my database, but I have not been able to do so with multiple
files.

The file names have a consistent beginning & end, but the middle is
different, for example 1 file may be called "quotes_nswapp_pif_200905.csv"
and another file may be called "quotes_vic_pif_200905.csv". I have tried
using wildcards and a loop statement so that I reference all of the separate
files so as to load them, but I have not had any success.

Any suggestions/guidance would be greatly appreciated

Thanks in advance
Kind regards
AC
 
Hello

I am using access 2007, and every month I have around 200 csv files that I
have to load into a table in my database.
In the past, I have used the TransferText command to automatically upload a
single file into my database, but I have not been able to do so with multiple
files.

The file names have a consistent beginning & end, but the middle is
different, for example 1 file may be called "quotes_nswapp_pif_200905.csv"
and another file may be called "quotes_vic_pif_200905.csv". I have tried
using wildcards and a loop statement so that I reference all of the separate
files so as to load them, but I have not had any success.

Any suggestions/guidance would be greatly appreciated

Thanks in advance
Kind regards
AC

Take a look at the Dir() function VBA help; it recognizes wildcards so

Dir("quotes*.csv")

should let you loop through all the files with such names.
 
Back
Top