title: Method ‘FindFirst’ of object ‘Recordset2’ failed. After not saving new record
body: <p>In a form, create a new record, edit some data but before saving it use a combo box on the form to select another record to navigate to. This triggers the <code>cboSalePicker_AfterUpdate</code>. Then during this sub <code>Form_BeforeUpdate</code> executes. The user clicks no on the MsgBox to not save the new record. Then the rest of <code>cboSalePicker_AfterUpdate</code> is executed however the following error message is displayed:</p>
  
  <p><strong>Error Message</strong></p>
  
  <pre><code>Error number -2147417848: Method ‘FindFirst’ of object ‘Recordset2’ failed.
  </code></pre>
  
  <p>Associated with the line <code>Me.Recordset.FindFirst "[SaleID] = " &amp; Str(Nz(cboSalePicker.Value, 0))</code></p>
  
  <p>However, if the new record is saved no error is produced and the code performs as expected.</p>
  
  <p><strong>Form_BeforeUpdate</strong></p>
  
  <pre><code>Private Sub Form_BeforeUpdate(Cancel As Integer)
  On Error GoTo ErrorHandler
      Dim strMsg As String
      Dim iResponse As Integer
  
      'Specify the mesage to display
      strMsg = "Do you wish to save the changes?" &amp; Chr(10)
      strMsg = strMsg &amp; "Click Yes to Save or No to Discard changes."
  
      'Display the msg box
      iResponse = MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?")
  
      'Check response
      If iResponse = vbNo Then
          'Undo the change.
          DoCmd.RunCommand acCmdUndo
          'Cancel the update
          Cancel = True
      End If
  
      Exit Sub
  
  ErrorHandler:
      MsgBox "Error number " &amp; Err.Number &amp; ": " &amp; Err.Description
  End Sub
  </code></pre>
  
  <p><strong>cboSalePicker_AfterUpdate</strong></p>
  
  <pre><code>Private Sub cboSalePicker_AfterUpdate()
  On Error GoTo ErrorHandler
  
      Me.Recordset.FindFirst "[SaleID] = " &amp; Str(Nz(cboSalePicker.Value, 0))
  
      Exit Sub
  ErrorHandler:
      MsgBox "Error number " &amp; Err.Number &amp; ": " &amp; Err.Description
  End Sub
  </code></pre>
  
  <p>Thanks</p>