Tables("表A").ApplyFilter = False
Dim Filter As String
With e.Form.Controls("TextBox1")
If .Value IsNot Nothing Then
Filter = "b = '" & .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 & "c = '" & .Value & "'"
End If
End With
With e.Form.Controls("TextBox3")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "d = '" & .Value & "'"
End If
End With
If Filter > "" Then
Tables("表A").Filter = Filter
End If
[此贴子已经被作者于2008-10-13 23:03:50编辑过]