各位老师早上好!!我这有一个"证书查询“窗口的组合筛选,总是达不到效果,不知错在哪里,请老师指教,谢谢!!
此主题相关图片如下:mo`8u~ha8@k@)wx{s5u8.png
在“确定筛选”按钮中的代码如下:最后的' Tables("证书查询_Table1").Filter = Filter,提示是找不到”证书查询_Table1“这个表,用Tables("员工资料.资质证件").Filter = Filter,又没有反应,不知如何处理了,谢谢老师们!
'-------------根据选择条件筛选
Dim Filter As String
With e.Form.Controls("cmbZJLX")
If .Value IsNot Nothing Then
Filter = "证件类型 = '" & .Value & "'"
End If
End With
With e.Form.Controls("cmbZJZT")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "状态 = '" & .Value & "'"
End If
End With
With e.Form.Controls("cmbZSJB")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "证书级别 = '" & .Value & "'"
End If
End With
If Filter > "" Then
' Tables("证书查询_Table1").Filter = Filter
Tables("员工资料.资质证件").Filter = Filter
End If