Dim y As Integer = Date.Today.Year
Dim w As Integer = Date.Today.DayOfWeek '算出今天是星期几
Dim dt1 As Date = Date.Today.AddDays(-w+1) '获取本周的第一天
Dim dt2 As Date = dt1.AddDays(7)
Dim Filter As String
Filter = "日期 >= #" & dt1 & "# And 日期 < #" & dt2 & "#"
msgbox(filter)
Tables("订单").Filter = Filter
---------------
Dim y As Integer = Date.Today.Year
Dim w As Integer = Date.Today.DayOfWeek '算出今天是星期几
Dim dt1 As Date = Date.Today.AddDays(-w+1).addDays(7) '获取本周的第一天
Dim dt2 As Date = dt1.AddDays(7)
Dim Filter As String
Filter = "日期 >= #" & dt1 & "# And 日期 < #" & dt2 & "#"
msgbox(filter)
Tables("订单").Filter = Filter