Hey there, I'm learning more and more every time I post and/or read contributions by other people, but I still have a long way to go. I have this problem now: I designed a Find command and it works fine, but I want all of the results to be written into a Listbox, so the user can select which one is the record it wants and I only manage to input one record, so if there are a lot of people named "John" it will only return the first one it finds. Can anyone help me, pls? The code below is the one I'm using:
Private Sub cmdFind_Click()
Dim strSearch As String
strSearch = CStr("%" & findbox.Text & "%")
Dim strList As String
Dim n As Integer
lstPacientes.Clear
With adoPrimaryRS
.MoveFirst
'Searches for any record that has the typed string on the Table;
.Find "Nombre LIKE '" & strSearch & "'", 0, adSearchForward
n = .RecordCount
Do
strList = .Fields("Nombre")
'Adds items for each string found;
lstPacientes.AddItem strList
Loop Until n
End With
End Sub
Thanks in advance for all the help you can supply me with. :cheesy: