FROM字句语法错误,求高手帮忙
Private Sub Command1_Click()Dim strquery As String
Dim wherestr As String
wherestr = ""
If DataCombo1.Text <> "" Then
wherestr = " and 性别='" & DataCombo1.BoundText & "'"
End If
If DataCombo2.Text <> "" Then
wherestr = " and ID='" & DataCombo2.BoundText & "'" & wherestr
End If
If DataCombo3.Text <> "" Then
wherestr = " and 姓名='" & DataCombo3.BoundText & "'" & wherestr
End If
If DataCombo4.Text <> "" Then
wherestr = " and 工作室='" & DataCombo4.BoundText & "'" & wherestr
End If
strquery = "select * from [Consultant] where1=1 " & wherestr
Adodc1.RecordSource = strquery
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
--------------------编程问答-------------------- strquery = "select * from [Consultant] where 1=1 " & wherestr
空格
补充:VB , 非技术类