[RESOLVED] Please Help:Autofilter problem again and again
Hi everyone again,
sorry for disturbing same problem again and again.but still i can not solve my problem totally for two weeks.I have had good support from you before but still i can not solve the problem.
When i write first letter in txtFilter i could show related(filtered) records on MSFlexGrid.(autofilter in MSFlexGrid)
Re: Please Help:Autofilter problem again and again
[vb code] ________________________________________________
Private Sub txtSearch_Change() 'this is the name of text box your searching in
If txtSearch.Text = vbNullString Then
sSQL = "SELECT * from EMPDATA " 'empdata is my table, change to your own
Set rs = db.OpenRecordset(sSQL)
Else
Set rs = db.OpenRecordset("SELECT * FROM EMPDATA WHERE ID LIKE '" & txtSearch.Text & "*'") <-- the * can be changed to wildcard by % and the WHERE ID LIKE you should change to what your searching for I was searching by ID in this code
End If
list <----Populates the listbox
End Sub