在vb中,模糊查询用的是*,而不是%,同样条件用''括起来。
比如:
select * from 表名 where 条件1='*" & me.conditionvalue & "*'"
sqlStr ="select * from 总表 where 件号 like '%" & text2 & "%' or 部件Like '%" & text1 & "%'"
要源码,那你把数据库MDB文件发给我吧
select 部件,件号 from zongbiao whele 部件='" & text1 & "' or 件号='" & text2 & "'"
可以Q250585158