i = 0
Do While Not objRS.EOF
Do While True
If i >= lstLeft.ListCount Then
Exit Do
End If
If lstLeft.ItemData(i) = objRS("ID") Then
lstRight.AddItem lstLeft.List(i)
lstRight.ItemData(lstRight.NewIndex) = lstLeft.ItemData(i)
lstLeft.RemoveItem i
Exit Do
Else
i = i + 1
End If
Loop
i = 0
objRS.MoveNext
Loop