title: import multiple CSV file into Access database and save them into different tables based on the file name
body: <p>I've got about 100 CSV files that I'm trying to import them into Access and then rename the tables based on the file names. </p>
  
  <p>Here is the code I've found but the "tablename" should be my file name. however, I can't get it to work as I'm new to scripting.</p>
  
  <pre><code>Function Import_multi_csv()
  
  Dim fs, fldr, fls, fl
  Set fs = CreateObject("Scripting.FileSystemObject")
  Set fldr = fs.getfolder("D:Files\")
  Set fls = fldr.files
  
       For Each fl In fls
  
        If Right(fl.Name, 4) = ".csv" Then
         DoCmd.TransferText acImportDelim, , "TableName", "D:Files\" &amp; fl.Name, False
        End If
  
       Next fl
  
  End Function
  </code></pre>
  
  <p>Also, I have three columns in my files and I want the third column to be imported as a double. </p>
  
  <p>Any help will be appreciated.</p>