title: Really deleting entries of MS Access database with ADODB command
body: <p>I would like to delete rows of an access table. Therefore I am using VBA with an ADODB command object.</p>
  
  <p>The problem is that instead of really deleting the row, the query just sets all values <strong>except the ID</strong> to 0 / ""</p>
  
  <p>What am I doing wrong or what do I need to do instead to really delete the entry?</p>
  
  <p>Thank you in advance!</p>
  
  <p>Code:</p>
  
  <pre><code>Dim db1 As ADODB.Connection
  Dim db_data As ADODB.Recordset
  Dim cmd As ADODB.Command
  
  ...'Code to build up Connection'
  
  Set cmd = New ADODB.Command
  
  cmd.ActiveConnection = db1
  cmd.CommandText = "DELETE FROM TableXY WHERE FieldXY = ValueXY"
  Set db_data = cmd.Execute
  </code></pre>