我是通过以下代码实现动态表的:
Dim Filter2 As String = "[合同编号] = '" & Tables("出库主表").Current("合同编号") & "'"
现在我想在动态表中应该如下代码进行筛选,如果增加进以上的代码,可以使筛选不至于在全表中筛选,而是有以上条件了。谢谢!
Dim Filter As String With e.Form.Controls("TextBox2") If .Value IsNot Nothing Then Filter = "[色名色号] LIKE '*" & .Value & "*'" End If End With With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " or " End If Filter = Filter & "[款号] LIKE '*" & .Value & "*'" End If End With If Filter > "" Then Tables("生产管理").Filter = Filter End If
|