| 发表于:2007-11-21 17:55:43 楼主 |
private sub cmdstart_click() set datagrid1.datasource = adocustomer adocustomer.recordsource = "select * from customer where 姓名 like '% " & txtfirname.text & "%'" adocustomer.refresh----这里调试时是黄色的,之前我是直接用adocutstomer在属性栏设置的连接,查询时没有问题;可当我把连接改为用form_load时就报这个错了,实在郁闷! if adocustomer.recordset.bof = false then msgbox "该客户不存在!", vbokonly, "提示" end if if txtfirname.text = "" then msgbox "请输入查询姓氏!", vbokonly, "提示" end if end sub 错误:先是提示我:adocustomer的from子句语法错误,然后我点确定,又提示我:实时错误:-2147217900 对象refrash方法 “iadodc”失败! 究竟哪错了啊!~ |
|
|
|
|