以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]模糊查找,Like触发错误 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=153138) |
-- 作者:秋夜凉了 -- 发布时间:2020/8/1 9:24:00 -- [求助]模糊查找,Like触发错误 请问老师,这段如何修改,可以查询有符号的,比如*,“”类的 Dim txt As String = e.Form.Controls("TextBox1").Text Dim tbl As Table = Tables("库存") If txt = "" Then tbl.Filter = "" Else txt = "\'%" & txt & "%\'" tbl.Filter = "规格名称 Like " & txt & " Or 件号图号 Like " & txt & " Or 材质 Like " & txt & " Or 备注 Like " & txt & " Or 物料编码 Like " & txt & " Or 库存编码 Like " & txt End If |
-- 作者:有点蓝 -- 发布时间:2020/8/2 9:53:00 -- txt = "\'%" & txt.replace("*","[*]").replace("\'","\'\'") & "%\'" |