Hi
I have 3 textbox linked to an Access DB by Binding source.I am having trouble to do query.
Lets me help u visualise the form
The form has 3 textbox (each linked to one field of a table in Access)
Another textbox allows user to enter a string and then user press a button
What i want to achieve ?
I want my form to search the string in the Access database and if found , it shows the data corresponding to the row where the string has been in the 3 textbox.If not found , then it display a message
What i managed to do so far?
//Textbox1 --> This textbox display customer name
//Textbox2--->Display address
//Textbox 3 --->Display phone number
//Note:All these textbox have already been linked to customer table via Binding source
Private Sub Search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Search.Click
Dim Searchsql As String
Dim string_find As String
string_find = txtsearch.Text
Searchsql = CustomerBindingSource.Find("First Name", string_find)
If Searchsql <> -1 Then
//help me here (give me a code snippet so that i if string_fiind exist , Textbox1,2 and 3 display the values conatined in that row
Else
MsgBox("Data not found")
End If
End Sub
I would like to get a solution that uses Bindingsource
Please help me
Thanks in advance
Greetings