Hi,
Thanks for the reply - I've just tried it and it doesn't come up with anything. I'm creating a new method called GetDataByInput and using the above as a search string. When I create the event handler to use it, I input the following:
------------------------------------------------------------------------------------------------
Protected
Sub SearchBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchBtn.Click
Dim recordAdapter As New recordTableAdapter
GridView.DataSource = recordAdapter.GetDataByInput(NameTxt.Text, SurnameTxt.Text, EmailTxt.Text, DeptTxt.Text)
GridView.DataBind()
End Sub
------------------------------------------------------------------------------------------------
Now when I put just one entry in the search form and click search, it doesn't return anything.
I tried creating another method called GetDataByName which just searched by the Name field. If I enter the following:
Protected
Sub SearchBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchBtn.Click
Dim recordAdapter As New recordTableAdapter
GridView.DataSource = recordAdapter.GetDataByName(NameTxt.Text)
GridView.DataBind()
End Sub
------------------------------------------------------------------------------------------------
Then I can search if I input a name, but if I don't enter anything, the same thing happens as above where I don't get any information displayed. I know I'm going wrong with something simple, but I can't put my finger on it. Any more help is appreciated.
Cheers
Tom