以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助] 过滤条件中默认选中复选框中的内容  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=140187)

--  作者:susanhe
--  发布时间:2019/8/31 10:33:00
--  [求助] 过滤条件中默认选中复选框中的内容

 

你好,如图红色圈出来的, 过滤条件中默认选中复选框中的内容 “Kaban", 当钩去掉后,就包含Kanban内空的记录。谢谢了。

 

 

Dim t1 As WinForm.textbox = e.Form.Controls("TextBox1")
Dim t2 As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim t5 As WinForm.TextBox = e.Form.Controls("TextBox3")
Dim t4 As WinForm.TextBox = e.Form.Controls("TextBox4")

Dim t6 As WinForm.TextBox = e.Form.Controls("TextBox5")
Dim t66 As WinForm.TextBox = e.Form.Controls("TextBox6")
Dim t77 As WinForm.TextBox = e.Form.Controls("TextBox7")

Dim filter As String = "1=1"
If t1.text > "" Then
    filter &= " and PartNo like \'%" & t1.text & "%\'"
End If
If t2.text > "" Then
    filter &= " and 层次 like \'%" & t2.text & "%\'"
End If

 

If t4.text > "" Then
    filter &= " and Buyer like \'%" & t4.text & "%\'"
End If


If t5.text > "" Then
    filter &= " and BOM like \'%" & t5.text & "%\'"
End If

If t6.text > "" Then
    filter &= " and supplier like \'%" & t6.text & "%\'"
End If

If t66.text > "" Then
    filter &= " and 委外表面处理 like \'%" & t66.text & "%\'"
End If

If t77.text > "" Then
    filter &= " and CriticalPart like \'%" & t77.text & "%\'"
End If

e.Form.controls("table1").Table.filter = filter


--  作者:susanhe
--  发布时间:2019/8/31 10:33:00
--  

图片点击可在新窗口打开查看此主题相关图片如下:捕获.jpg
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2019/8/31 10:54:00
--  
if e.Form.Controls("复选框名称").checked then
    filter &= " and Kanban is not null"
else
    filter &= " and Kanban is null"
end if