Dim Filter As String With e.Form.Controls("ComboBox1") If .Value IsNot Nothing Then Filter = "分队 = '" & .Value & "'" End If End With With e.Form.Controls("TextBox1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "姓名 Like '*" & .Value & "*'" End If End With If Filter > "" Then Tables("基本信息").Filter = Filter End If