In ur txtbox_selectedIndexChanged event call the following function
public sub getData()
dim dbconn,sql,dbcomm
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" & server.mappath("northwind.mdb"))
dbconn.Open()
sql="SELECT CUSTNUM,CUSTNAME,CUSTACTIVE FROM customers where CUSTACTIVE <> 'I'"
If txtNum.Text <> 0 Then
sql= sql & " AND CUSTNUM LIKE '" & txtNum.Text & "%'"
End If
If txtName.Text <> 0 Then
sql= sql & " AND CUSTNAME LIKE '" & txtName.Text & "%'"
End If
dbcomm=New OleDbCommand(sql,dbconn)
end sub
After getting data from it use it in ur program