以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 筛选 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=174256) |
-- 作者:aaa1234 -- 发布时间:2022/1/7 17:57:00 -- 筛选 If e.Form.Controls("TextBox2").Text = "" Then Tables("录入窗口_table3").filter = "总sku=\'" & "null" & "\'" Else Dim Filter As String Dim txt1 As String = e.Form.Controls("TextBox2").Text Dim tbl As Table = Tables("录入窗口_table3") If txt1 = "" Then tbl.Filter = "" Else Dim Values() As String Values = txt1.split(",") Dim f As String For Index As Integer = 0 To Values.Length - 1 If f > "" Then f = f & " or " Dim txt As String =Values(Index) txt = "\'%" & txt.replace("*","[*]") & "%\'" f = f & "总sku Like " & txt Next tbl.Filter = f End If If Filter > "" Then Tables("录入窗口_table3").Filter = Filter End If End If 怎么将模糊筛选改为普通筛选
|
-- 作者:aaa1234 -- 发布时间:2022/1/7 18:02:00 -- 我搜索d01就查到d01-1跟d01,我想他精确一些,只能搜到d01 [此贴子已经被作者于2022/1/7 18:02:35编辑过]
|
-- 作者:程兴刚 -- 发布时间:2022/1/7 19:54:00 -- txt = "\'" & txt.replace("*","[*]") & "\'" f = f & "总sku = " & txt
|
-- 作者:aaa1234 -- 发布时间:2022/1/8 8:41:00 -- If e.Form.Controls("TextBox2").Text = "" Then Tables("录入窗口_table3").filter = "总sku=\'" & "null" & "\'" Else Dim Filter As String Dim txt1 As String = e.Form.Controls("TextBox2").Text Dim tbl As Table = Tables("录入窗口_table3") If txt1 = "" Then tbl.Filter = "" Else Dim Values() As String Values = txt1.split(",") Dim f As String For Index As Integer = 0 To Values.Length - 1 If f > "" Then f = f & " or " Dim txt As String =Values(Index) txt = "\'" & txt.replace("*","[*]") & "\'" f = f & "总sku = " & txt Next tbl.Filter = f End If If Filter > "" Then Tables("录入窗口_table3").Filter = Filter End If End If
|
-- 作者:有点蓝 -- 发布时间:2022/1/8 9:17:00 -- 代码没有问题。 删除项目里的bin目录,重启项目测试
|