以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- TextChanged (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=193569) |
-- 作者:1234567 -- 发布时间:2024/9/26 9:32:00 -- TextChanged .NET Framework 版本:4.0.30319.1
Dim Filter As String
\'msgbox(Filter)
|
-- 作者:cd_tdh -- 发布时间:2024/9/26 9:59:00 -- 这个意思? Dim Filter As String With e.Form.Controls("TextBox1") If .Value <> Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "车台产品编号 like \'%" & .Value & "%\'" End If End With With e.Form.Controls("TextBox2") If .Value <> Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "加工单位 like \'%" & .Value & "%\'" End If End With If Filter > "" Then Tables("表A").Filter = Filter End If
[此贴子已经被作者于2024/9/26 9:59:20编辑过]
|
-- 作者:有点蓝 -- 发布时间:2024/9/26 10:21:00 -- 字符列才能使用like,整数列要做转换。 Filter = Filter & "convert(车台产品编号,\'System.String\') like \'%" & .Value & "%\'" 另外,多个控件条件查询建议使用这种用法:http://www.foxtable.com/webhelp/topics/1058.htm |
-- 作者:1234567 -- 发布时间:2024/9/26 10:21:00 -- 原因找到了。 Dim Filter As String Dim txt2 As String = e.Form.Controls("TextBox2").Text
If Filter > "" Then |