Combobox trouble

  • Thread starter Thread starter Tom R.
  • Start date Start date
T

Tom R.

Hello!
I've made a combobox to search for people in a form. It works, in a way, but
not totally. It sorts by Lastname, but I can also se the persons first name
in the combo.
The trouble is that if there are more people with the same lastname, the
combo gives me the first name Anderson, Anne instead of the name Anderson,
Dave, who I really wantet to see in the form.

How can I solve this problem?

Code from the combo: (Etternavn is Lastname in Norwegian =) )
Private Sub Combo62_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Etternavn]= '" & Me![Combo62] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 
I think I shorted it out my self.
I just added the ID field that is uniqe and then it was solved.
 
Back
Top