上月26日到本月25日:
Dim d As Date = Date.Today
Dim d1 As Date = New Date(d.Year,d.Month,25)
Dim d2 As Date = d1.AddMonth(-1).AddDays(1)
Select Case CurrentTable.name
Case "原料出库"
Tables("原料出库").Filter = "[使用日期] >= #" & d1 & "# And [使用日期] < #" & d2 & "#"
MainTable = Tables("原料出库")
Case "原料入库"
Tables("原料入库").Filter = "[入库日期] >= #" & d1 & "# And [入库日期] < #" & d2 & "#"
MainTable = Tables("原料入库")
End Select