WILD BILL,

Thanks for speedy reply.
The procedure that contains the offensive code is as follows:

------------------------------------------------------------------------
Private Sub cmbBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles cmbBox.SelectedIndexChanged

Dim sqlx As String

Dim xxx As String


OleDbConnection1.Open()

xxx = cmbBox.SelectedValue

sqlx = "select field1 from table1 where table1.field2= " & xxx & " "


Me.OleDbDataAdapter2.SelectCommand.CommandText = sqlx

Me.DSmdl1.Clear()
Me.OleDbDataAdapter2.Fill(DSmdl1, "table1l")

cmbBox2.DataBind()

End Sub

I am trying to change the command text to sqlx

Thanks again.