Hi all,

I made a dataform1 (with the wizard) wich creates a OleDbDataAdapter1 and a objDataSet1. I made a second OleDbDataAdapter 2 and a DataSet2 for another quiery (on the same dataform) and afterwards i put in the following code:


VB Code:
  1. PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         Dim Zoekwoord As String
  3.         Zoekwoord = "%" & TextBox1.Text & "%"
  4.         OleDbDataAdapter2.SelectCommand.Parameters("NmEnVn").Value = Zoekwoord
  5.  
  6.         DataSet2.Clear()
  7.         OleDbDataAdapter2.Fill(DataSet2)
  8.  
  9. End Sub


The OleDbDataAdapter2 has the select-command: SELECT NmEnVn, ID FROM Lijst WHERE (NmEnVn = ?)

I put in a datagrid to verifie the result. With the code above, i don't get a result but not an error either.

When I change:
VB Code:
  1. Zoekwoord = "%" & TextBox1.Text & "%"
in
VB Code:
  1. Zoekwoord = TextBox1.Text

I get a result when TextBox1.Text is exactly one of the names in "NmEnVn". But what I want is that if I type "Co" I will get all the results with "Co" in it, like "Cornelis" and "Coppens" and "Cosemans" ...

Can someone help me pls? Can it be the problem that i'm working in a dataform ?