B
BonnieW via AccessMonster.com
I have a combo box that queries from a table of people to get a list of names,
ordered lastname, firstname, peopleID. There are several people in this list
that have the same last name, and no matter which person I choose with that
last name, Access chooses the first person with that last name.
(So effectively, if I have Smith Jon 1, Smith Jane 8, Smith Harold 9074395,
it'll always stick with Smith Harold 9074395.)
The VBA behind this is:
Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LastName] = '" & Me![Combo26] & "'"
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
End If
Rem MsgBox "Check back later this is being improved!"
DoCmd.GoToControl "Command28"
End Sub
Advice please?
ordered lastname, firstname, peopleID. There are several people in this list
that have the same last name, and no matter which person I choose with that
last name, Access chooses the first person with that last name.
(So effectively, if I have Smith Jon 1, Smith Jane 8, Smith Harold 9074395,
it'll always stick with Smith Harold 9074395.)
The VBA behind this is:
Private Sub Combo26_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LastName] = '" & Me![Combo26] & "'"
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
End If
Rem MsgBox "Check back later this is being improved!"
DoCmd.GoToControl "Command28"
End Sub
Advice please?