I have a question and hope it's possible
i have a form with a datagridview with textboxes above (see picture).
What i want to do is from the moment i type a character in a textbox he start searching in the datagridview. With other words... he has to look for it on textChanged.
i taught i make in my form a function
VB Code:
Function selectCustomer() As String Dim i, t As Integer Dim searchstring As String Dim string1, string2, string3 As String Dim name, lastname, address, zipcode, city, speciality, phone As String name = Me.txtSearchCustomerName.Text lastname = Me.txtSearchCustomerLastname.Text address = Me.txtSearchCustomerAddress.Text zipcode = Me.txtSearchCustomerZipcode.Text city = Me.txtSearchCustomerCity.Text speciality = Me.cmbSearchCustomerSpeciality.Text phone = Me.txtSearchCustomerTelephone.Text string1 = "SELECT ... FROM ... " string3 = ";" string2 = String.Concat("WHERE ", strCustomerName, " LIKE '%", name, "%' AND '", strCustomerLastName, "LIKE '%", lastname, "%'etc...") searchstring = String.Concat(string1, string2, string3) Return searchstring End Function
from the moment the text in a textbox change, it has to send (don't know how) the string (searchstring) to the class data_function where it makes a connection with the databank, get the data from the databank and send it back to the form and update the datagridview. And that for all the characters i type in all the textboxes (+1 combobox) i have above the datagridview.
is this possible and how...
(if it is not a problem for you, please explain with some code...)
i hope its clear for you
greetz freakyme![]()





Reply With Quote