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