ADO只支持单个字段的find,所以不能AND了。
可以这样使用
Adodc1.Recordset.filter="学号='" & xh & "' and 课程='" & Combo1.Text & "'"
if Adodc1.Recordset.eof then
未找到
else
未找到
endif
可以这样使用
Adodc1.Recordset.filter="学号='" & xh & "' and 课程='" & Combo1.Text & "'"
if Adodc1.Recordset.eof then
未找到
else
未找到
endif
And
Adodc2.Recordset.Find "课程='" & Combo1.Text & "'"你试试吧!
或者你用DAO或RDO访问数据库好了,他们是支持的。
adodc2.recordset.filter="学号='" & xh & "' and 课程='" & Combo1.Text & "'"
if Adodc2.Recordset.eof then
未找到
else
adodc1.recordset.book=adodc2.recordset.book
endif