对象refresh的方法iadodc失败
If Check1.Value = 0 And Check2.Value = 1 And Check3.Value = 0 And Check4.Value = 0 Then
Adodc1.RecordSource = "select * from 项目信息 where 项目类别 = " & DataCombo1.Text & ""
Adodc1.Refresh
End If
If Check1.Value = 0 And Check2.Value = 0 And Check3.Value = 1 And Check4.Value = 0 Then
Adodc1.RecordSource = "select * from 项目信息 where 项目名称 like '%" + Text1.Text + "%'"
Adodc1.Refresh
End If
这两段代码,后面一个在执行的时候没有问题,可是前一个执行的时候老是说“对象refresh的方法iadodc失败”这是为什么啊?
[解决办法]
where 项目类别 = '" & DataCombo1.Text & "'