Hello everybody,
I've managed with the help of these forums
to creat a search form, howver how do i get it to update for the next search results. For now it gets all mixed up.
I tried the requery but it didnt work
Thank you,
Samia
I've managed with the help of these forums
Code:
Private Sub srchBtn_Click()
Dim dbs As Database
Dim rst As Recordset
Dim strsql As String
Set dbs = CurrentDb
strsql = "SELECT Address FROM tblPipo WHERE Address LIKE '" & Me![txtSearch] & "'"
Set rst = CurrentDb.OpenRecordset(strsql)
With rst
Do Until .EOF
List.AddItem (rst.Fields(0))
Me.List.Requery
.MoveNext
cnt = cnt + 1
Loop
End With
MsgBox "Done with Processing"
End Sub
I tried the requery but it didnt work
Thank you,
Samia