VB6, Excel database, and I am not that good at these strings
I have a sql string which pulls all data from an employee directory db on startup. I get every listing in the db for each employee.
In a textbox_change routine for the first name, I have a sql string as follows:
Problem is when I start typing in the textbox, it does exactly what it says it does and not what I want it to do.Code:strSQL = "SELECT FirstName" _ & " , LastName" _ & " , Dept" _ & " , Sub" _ & " , Loc" _ & " , Ext" _ & " , EmpID" _ & " FROM [mytable$] " _ & " WHERE FirstName='" & txt_First.Text & "'" _ & " ORDER BY LastName" _ & " , FirstName"
What I want is like an auto complete. When I type the entire listings that get shown in a listview need to decrease until I have finished typing. I need something like a wild card in there.
& " WHERE FirstName='" & txt_First.Text & "*'" _
what do I need here?




Reply With Quote