老师,您好!如图查询按钮,我想将“缴费日期”列,按年度查询,如下代码应该如何修改?请老师指点。
此主题相关图片如下:捕获.png

Dim nms() As String = {"xinminbox","sfzbox","ynzbox","niandu"}
Dim sps() As String = {"'","'","'","#"}
Dim bjf() As String = {" = "," = "," = "," = "}
Dim fds() As String = {"姓名","身份证号","医疗证号","缴费时间"}
Dim filter As String
Dim dt As DataTable
For i As Integer = 0 To nms.Length - 1
If e.Form.Controls(nms(i)).value IsNot Nothing Then
If filter > "" Then
filter = filter & " and "
End If
filter = filter & fds(i) & bjf(i) & sps(i) & e.Form.Controls(nms(i)).value & sps(i)
End If
Next
If filter > "" Then
Tables("参合成员信息").filter = filter
End If
[此贴子已经被作者于2019/11/6 15:20:34编辑过]