Dim Filter As String
With e.Form.Controls("TextBox1")
If .Value IsNot Nothing Then
Filter ="产品编号 Like '%" & .Value & "%'"
End If
End With
If Filter > "" Then
Tables("BOM表").Filter = Filter
End If
With e.Form.Controls("TextBox2")
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