你的这句代码就有问题
If rs!no <> setno Or rs!Name <> setname Then
其实,作为查询的结果,您只需要这样判断记录数是否为0就可以知道是否有满足条件的记录了,例如
if rs.recordcount=0 then MsgBox "没有相关记录"
If rs!no <> setno Or rs!Name <> setname Then
其实,作为查询的结果,您只需要这样判断记录数是否为0就可以知道是否有满足条件的记录了,例如
if rs.recordcount=0 then MsgBox "没有相关记录"
Updata
www.applevb.com