title: Combobox searches subform for all matching records
body: <p>I borrowed some code from another Access database from one of my colleagues to simply search a table which is bound to a subform by searching from a separate "people" table.  I'm a little rusty on the syntax, so I'm unsure how to correct the code to make it work for my program.</p>
  
  <p>So once a person is selected from the combobox, it is supposed to search the "owner" field in the "vehicles" table for all matching records and display them. </p>
  
  <pre><code>Private Sub Form_Open(Cancel As Integer)
      Combo0.SetFocus
  End Sub
  
  Private Sub Combo0_AfterUpdate()
  
      ' Find the record that matches the control.
      Dim rs As DAO.Recordset
  
      Set rs = Me.Recordset.Clone
      rs.FindFirst "[Owner.vehicles] = '" &amp; Str(Nz(Me![Combo0], 0)) &amp; "'"
      If Not rs.EOF Then Me.Bookmark = rs.Bookmark
  
      Forms!frmVehReg!subFrmVehReg.SetFocus
  
      Forms!frmVehReg!subFrmVehicles.Form!Make.SetFocus
  
  
  End Sub
  </code></pre>