Dim
y As Integer = 2011'指定年份 Dim q As Integer = 2'指定季度 Dim dt1 As NewDate(y, 3 * (q - 1) + 1, 1) '获取该季度的第一天 Dim dt2 As NewDate(y, 3 * q, Date.DaysInMonth(y,3 * q)) '获取该季度的最后一天 Dim Filter As String Filter =
"日期 >= #"&dt1&"# And
日期 <= #"&dt2&"#" Tables("订单").Filter =
Filter