Dim Filter As String
With e.Form.Controls("品名")
If .Value IsNot Nothing Then
Filter = Filter & "品名 like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("生产厂家")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "生产厂家 like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("规格")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "规格 like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("备注")
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("表A").Filter = Filter
End If