这个意思?
Dim Filter As String
With e.Form.Controls("TextBox1")
If .Value <> Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "车台产品编号 like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("TextBox2")
If .Value <> Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "加工单位 like '%" & .Value & "%'"
End If
End With
If Filter > "" Then
Tables("表A").Filter = Filter
End If
[此贴子已经被作者于2024/9/26 9:59:20编辑过]