title: Odd runtime error in VBA: -2147352567
body: <p>Morning,</p>
  
  <p>I encountered this odd runtime error when I tried to perform an update to a field:</p>
  
  <p><img src="https://i.stack.imgur.com/Vm6su.jpg" alt="enter image description here"></p>
  
  <p>This occurred when the VBA code attempted to set a field (which is a normal textbox and doesn't have a date format set) to a text value from a table. It should set that textbox to "somename" to signify who made the change.
  The second sentence seems wrong to me as the value returned is a string.</p>
  
  <p>The VBA code that returns the error is actually a <code>BeforeUpdate</code> routine - could this be why? </p>
  
  <pre><code>Private Sub Stat_Code_BeforeUpdate(Cancel As Integer)
  </code></pre>
  
  <p>where <code>Stat_Code</code> is a combo-box on the same subform.</p>
  
  <p>I looked about but couldn't find any solution that would explain this. Any ideas? </p>