-- [求助]关于多个textbox对应列的模糊查询
在帮助 设计查询窗口 中关于同时多个精确查询的案例及代码,但若要求改成支持每一个TEXTBOX只是对应列的模糊查询的话,应该如何修改呢?我参考一个textbox可以同事支持多列的模糊查询设置都不行
Dim Filter As
String
With
e.Form.Controls("cmbProduct")
If
.Value IsNot
Nothing
Then
Filter = "产品 = \'" & .Value &
"\'"
End
If
End
With
With e.Form.Controls("cmbCustomer")
If .Value IsNot
Nothing
Then
If Filter > "" Then
Filter = Filter &
" And "
End
If
Filter = Filter & "客户 = \'" & .Value
& "\'"
End
If
End
With
With e.Form.Controls("cmbEmployee")
If .Value IsNot
Nothing
Then
If Filter >"" Then
Filter = Filter &
" And "
End
If
Filter = Filter & "雇员 = \'" & .Value
& "\'"
End
If
End
With
If Filter > ""
Then
Tables("订单").Filter = Filter
End If
[此贴子已经被作者于2016/3/10 15:42:53编辑过]