J
JC
I have a list box loaded with Student Name, Social Security. When the
user click on a specific record, the following code is assigned to the
lstStudent1_AfterUpdate procedure.
Private Sub lstStudent1_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[StudentName] = '" & Me![lstStudent] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
This works great, but not when you have duplicate Student Name and
Social Security records in the table. At this point, the recorset uses
FindFirst and returns the first instance in the record-set. It never
moves to the next one.
How do I get my list box to move to the next record in the table when
you click on the next matching record in the list box?
Thank you to anyone that can assist,
Justin
user click on a specific record, the following code is assigned to the
lstStudent1_AfterUpdate procedure.
Private Sub lstStudent1_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[StudentName] = '" & Me![lstStudent] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
This works great, but not when you have duplicate Student Name and
Social Security records in the table. At this point, the recorset uses
FindFirst and returns the first instance in the record-set. It never
moves to the next one.
How do I get my list box to move to the next record in the table when
you click on the next matching record in the list box?
Thank you to anyone that can assist,
Justin