title: Record is deleted error after executing vb code (that deletes the record)
body: <p>I have a problem with one of my databases that I have had for some time that is somewhat of an annoyance.</p>
  
  <p>I have a form in continuous view in which the user must fill out some information for each record and then click a "commit" button (for each record).</p>
  
  <p>Based on the values entered for that record, the "commit" button will first insert the information in one of two tables, then delete the record from the temporary table from which the form is querying.</p>
  
  <p>psuedocode for it is here:</p>
  
  <pre><code>IF x.checked &amp;&amp; y &gt; 70 then
    db.execute "Insert into tblCompleted values (me.empID,'completed',me.y);
  else
    db.execute "insert into tblIncompleted values (me.empid, 'incomplete', 'me.y);
  end if
  db.execute "delete * from tblTemporary WHERE empid = me.empID"
   'form.requery
  'form.refresh
  </code></pre>
  
  <p>I will sometimes get a 'record is deleted' runtime error, sometimes twice for the same record. However, all operations do work. After it has been completed, however, the record shows ##DELETED. To fix this, I put a Form.refresh and Form.requery statement at the end of my code. This will eliminate the ##DELETED record, but often throw me a "record is deleted" error.</p>
  
  <p>Before you say "why are you using two tables, couldn't this just be modeled with one table", this is a simplified version of what I'm actually doing, and to me, using two tables makes more sense design-wise.</p>
  
  <p>My main concern is this run time error. I could just catch it and leave it unhandled, but I'd prefer actually fixing it and sorting out this buggy form. Any thoughts?</p>