此主题相关图片如下:qq图片20180423165505.png
Dim Filter As new List(of String)
Dim ComboBox1 As String = e.Form.Controls("客户名称").text
Dim ComboBox2 As String = e.Form.Controls("付款状态").text
Dim sst As String = e.Form.Controls("开始日期").text
Dim est As String = e.Form.Controls("结束日期").text
If ComboBox1 > "" Then Filter.add("客户名称 like '%" & ComboBox1 & "%' Or 业务员 Like '%" & ComboBox1 & "%'")
If ComboBox2 > "" Then Filter.add("付款状态 like '%" & ComboBox2 & "%'")
If sst > "" Then Filter.add("订单日期 >= #" & sst & "# ")
If est > "" Then Filter.add("订单日期 <= #" & est & "# ")
Tables("订单表").Filter = String.Join(" and ",Filter.ToArray())