窗口中查询按钮Click事件代码如下:
Dim gzdw As WinForm.CheckedComboBox = e.Form.Controls("工作单位")
Dim pjpc As WinForm.CheckedComboBox = e.Form.Controls("评价批次")
Dim xm As WinForm.TextBox = e.Form.Controls("姓名")
Dim sfzhm As WinForm.TextBox = e.Form.Controls("身份证号码")
Dim filter As String = "1=1"
If gzdw.Text > "" Then
filter &= " and 工作单位 in ('" & gzdw.Text.replace(",", "','") & "')"
End If
If pjpc.Text > "" Then
filter &= " and 评价批次 in ('" & pjpc.Text.replace(",", "','") & "')"
End If
If xm.Text > "" Then
filter &= " and 姓名 like '*" & xm.Text & "*' "
End If
If sfzhm.Text > "" Then
filter &= " and 身份证号码 like '*" & sfzhm.Text & "*'"
End If
Tables("技能评价表").Filter = filter