代码错误信息提示如下:
详细错误信息:
该字符串未被识别为有效的 DateTime。有一个从索引 10 处开始的未知字。
这是编写的代码,请帮忙查看一下问题出现在哪?谢谢!
Dim nms() As String={"材料代号","起始日期","结束日期"}
Dim sps() As String={"'","#","#"}
Dim bjf() As String={" = "," >= "," >= "}
Dim fds() As String={"材料代号","日期","日期"}
Dim Filter As String
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
Tables("电解电容").Filter = Filter