Dim cz As WinForm.TextBox = e.Form.Controls("TextBox20")
Dim fil As String =cz.text
Dim Filter As String
If e.Form.Controls("产品名称").checked = True Then
Filter = "[产品名称] like \'" & fil & "\'"
ElseIf e.Form.Controls("材料").checked = True Then
Filter = "[材料] like\'" & fil & "\'"
ElseIf e.Form.Controls("客户").checked = True Then
Filter = "[客户] like \'" & fil & "\'"
ElseIf e.Form.Controls("项目负责人").checked = True Then
Filter = "[项目负责人] like \'" & fil & "\'"
End If
If fil IsNot Nothing Then ‘文件框不为空进行筛选’
Tables("产品信息").Filter=Filter
Else
Tables("产品信息").Filter="" ‘文件框没有内容时显示全部
End If