Dim tbl As Table = Tables("窗口6_Table1")Dim Filter As String With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then If Filter > "" Then
Filter = Filter & " And "
End If
Filter = "年度 = '" & .Value & "'"
End If
End With
With e.Form.Controls("TextBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "月份 = '" & .Value & "'"
End If
End With
……
If Filter > "" Then
tbl.Filter = Filter
Tables("制造质量管理").Filter = Filter
End If
[此贴子已经被作者于2018/4/7 9:43:43编辑过]