I have an unbound combo box on a form that is used to select a record by surname. The complete record is then displayed in various controls on the form. I realised after completing the project that there are multiple instances of the same surname i.e. 5 Smiths. When any of the Smiths are selected from the combo box it is only ever the first instance that is displayed and the user is then required to use the scroll wheel to move to the correct one.
I amended the combo to display two columns so that the first name could be shown also but this hasn't fixed the problem with record selection.
The after Update event on the combo box is:
Private Sub Combo54_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Surname] = '" & Me![Combo54] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Is there a way in which I can select the exact record I need from the combo box?
All help appreciated.
Chalkie.
I amended the combo to display two columns so that the first name could be shown also but this hasn't fixed the problem with record selection.
The after Update event on the combo box is:
Private Sub Combo54_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Surname] = '" & Me![Combo54] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Is there a way in which I can select the exact record I need from the combo box?
All help appreciated.
Chalkie.