
此主题相关图片如下:1600070251(1).png

对“表A"时间列进行筛选
测试2020-09-13,表示的是2020年9月13日0分0秒
如果对于2020-09-13,
早于:希望得到13日以前,不包括13日
等于:希望得到13日的
晚于:希望得到13日以后,不包括13日
以下代码如何修改?谢谢指点!
Dim a As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim b As WinForm.TextBox = e.Form.Controls("TextBox1")
With Tables("表A")
Select Case e.sender.text
Case "早于"
.filter = "[" & a.Text & "] < '" & Cdate(b.Text) & "'"
Case "等于"
.filter = "[" & a.Text & "] = '" & Cdate(b.Text) & "'"
Case "晚于"
.filter = "[" & a.Text & "] > '" & Cdate(b.Text) & "'"
End Select
End With