请高人看看,运行时提示编译错误,语法错误!感谢。
Private Sub cmbname_Click()
Dim condition
condition = Trim(cmbfield.Text)
If Adodc1.Recordset.Fields(condition).Type = 202 Then
adodc1.recordsource="select * from 库存表 where"&condition&"='"&cmbname.text&"'"
Else
adodc1.recordsource="select * from 库存表 where"&condition&"="&cmbname.text
End If
Adodc1.Refresh
txtno.Text = Adodc1.fieldset.Fields("货物编号")
txtname.Text = Adodc1.Recordset.Fields("货物名称")
txtstorenum.Text = Adodc1.Recordset.Fields("库存量")
txtunit.Text = Adodc1.Recordset.Fields("单位")
End Sub