1 Attachment(s)
[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)
i enclosed my whole project with its database.
Could you please check it?
thanks in advance
Re: Please Help:Autofilter problem again and again
:bigyello:
[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
[/vb code]
:thumb: hope this helps you out. :cool:
Re: Please Help:Autofilter problem again and again
Hi everyone,
I solved my problem and enclosed the project to VBCodeBank.
Thanks