Hi,

I am creating an application in vb linked with a access database and i am having problems searching records.

For the team screen I have the following database query that I wish to call:

SELECT     TeamName, [Section]
FROM         Team
WHERE     (TeamName LIKE ''' & TeamNameSearchTextbox.Text & ''')

The whole point is the user would enter a team name or part of a team name in the TeamNameSearchTextbox field and click search and the database would return the matching records. However at the minute when search is clicked nothing is returned.

Here is the button click event code i have:

Try
TeamTableAdapter.SearchTeamName(Me.DefectManagementToolDatabaseDataSet.Team)
Catch ex As Exception
MsgBox("Invalid")
End Try

SearchTeamName is the name of the database query.

Was wondering if anyone could help i have been trying to solve this problem for quite a while now.

Many thanks,

David

Hi
Here is my attached help. I have made this for someone who was in same problem and was proved helpful. I believe your problem will also be solved by this.

Any more question can be asked and I/we will try to help.

Hope this Helps.

...Like "'%" & inputedvalue & "%'"

Good Luck

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.