title: Import .DBF file in MS Access after button press, Using VBA
body: <p>I have to import .DBF file int MS Access Table On button click. </p>
  
  <p>The file name is SourceTable.dbf ; Access database is StudentDataBase.accdb and the table I want to insert it is named myTable.  </p>
  
  <p>First I want to ask: do I need to have the same fields in the table or it can just be a blank table. I have the following sample code:</p>
  
  <pre><code>DoCmd.TransferDatabase transfertype = acImport, databasetype = "dBase III", DatabaseName = "C:/SourceTable.dbf", objecttype = acTable, Source = "SourceTable", destination = "myTable"
  </code></pre>
  
  <p>Where in the code do I specify the database, where the table is (StudentDataBase)?</p>
  
  <p>And when I run it like that, i get "Run-time error 2507 The 0 type isn't installed database type or doesn't support the operation you chose."</p>
  
  <p>I'm new To Access and VB programming, so please add some guides on how to rewrite that code line. </p>
  
  <p>Thanks!</p>