Hi,
I have a listView control. I populate the control by looping through a recordset that I retrive from a table.
I also have a Search text box that I let the user type what they are looking for and it will narrow down the result as they type.
On the "OnChange" property of the text box I build a dynamic sql statment that will return a recordset containing all the records that one of their fields matched the search criteria like :
SELECT * from tblMyTable Where Myfield LIKE '*' & criteria & '*'.
Then I clear the listBox, loop through the recordset and add them to the list.
PROBLEM:
each time the user types a letter the whole recordset is sent from the server to the client. This is unecasary network traffic since its already sitting in the list.
I know you can use FindItem method to look for an item in the list. But can you use wildcards with the FindItem?
If not is there any way to narrow down a ListBox results?
Thanks
I have a listView control. I populate the control by looping through a recordset that I retrive from a table.
I also have a Search text box that I let the user type what they are looking for and it will narrow down the result as they type.
On the "OnChange" property of the text box I build a dynamic sql statment that will return a recordset containing all the records that one of their fields matched the search criteria like :
SELECT * from tblMyTable Where Myfield LIKE '*' & criteria & '*'.
Then I clear the listBox, loop through the recordset and add them to the list.
PROBLEM:
each time the user types a letter the whole recordset is sent from the server to the client. This is unecasary network traffic since its already sitting in the list.
I know you can use FindItem method to look for an item in the list. But can you use wildcards with the FindItem?
If not is there any way to narrow down a ListBox results?
Thanks