Private Sub cmdFind_Click()
Dim sst As String
sst = InputBox$("输入部门编号", "查询")
Adodc1.RecordSource = "select * from 部门表 where 部门编号like '% '&sst&'%'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
   cmddel.Enabled = True
   Text2.Enabled = True
   Text1.Enabled = True
   i = 1
   Text1.Text = Adodc1.Recordset.Fields("部门编号").Value
   Text2.Text = Adodc1.Recordset.Fields("部门名称").Value
Else
   i = 0
End If
End Sub
知道是"select * from 部门表 where 部门编号like '% '&sst&'%'"有错误,但应该怎么改呢?
穷人,没多少分,抱歉