Dim Filter As String
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
With e.Form.Controls("TextBox3")
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("TextBox4")
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("TextBox5")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "归档编码 like '%" & .Value & "%'"
End If
End With
If e.Form.Controls("CheckBox1").Checked = True
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "注册备案_效期<# " & Date.Today & "#" '< #" & Date.Today & "#"
End If
If e.Form.Controls("CheckBox2").Checked = True
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "注册备案_有无=false"
End If
With e.Form.Controls("ComboBox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "归档类别='" & .Value & "'"
End If
End With
If e.Form.Controls("CheckBox3").checked=True
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "临时标记=False"
End If
Tables("新版医用耗材产品证件管理主窗口_Table1").Filter = Filter