以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 请教 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=60434) |
-- 作者:hbhb -- 发布时间:2014/11/24 23:09:00 -- 请教 甜大师:好!请问下面的代码错在哪里?为何不对 Dim a As WinForm.Table = e.Form.Controls("Table1") Dim tb As Table tb = a.Table Dim va As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1") Dim sz() As String If va.Value.Contains(",") Then sz = va.Value.Split(",") Else sz = va.Value End If Dim Filter As String For Each dc As String In sz If Filter > "" Then Filter = Filter & " or" & " 名称 like \'*" & dc & "*\'" End If Filter = "名称 like \'*" & dc & "*\'" Next tb.Filter = filter
|
-- 作者:有点甜 -- 发布时间:2014/11/24 23:18:00 -- Dim Filter As String = "1=2" For Each dc As String In sz Filter = Filter & " or 名称 Like \'%" & dc & "%\'" Next |
-- 作者:hbhb -- 发布时间:2014/11/24 23:21:00 -- For Each dc As String In sz If Filter > "" Then Filter = Filter & " or" & " 名称 like \'*" & dc & "*\'" else Filter = "名称 like \'*" & dc & "*\'" End If Next 这样写一样吗?
|
-- 作者:hbhb -- 发布时间:2014/11/24 23:36:00 -- 请问以上代码为何不能写在 离开控件的事件里?在按钮就可以? Leave 离开控件的后执行。 e参数属性: Sender:返回触发事件的控件 |
-- 作者:有点甜 -- 发布时间:2014/11/25 9:04:00 -- 可以写在leave事件里啊,但是 va.Value 要改成 va.Text |