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

Anyone can help me.............

Please someone reply ........I can continue my school assignment without solving this:(

I solved it myself
How i did
Bindingsource.Position = Index

could you please tell me what you did? the full code? im kinda having the same problem,

@ryin012 for sure

If Searchsql <> -1 Then
Bindingsource.Position = Index
EndIf

how to retreive data from ms acess to another form

but i need to display the values from ms acess to a second form when i button click on 1st form.how i do this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.