Dim d1 As Date = new Date(Date.Today.Year, Date.Today.Month, 1) Dim d2 As Date = new Date(Date.Today.Year, Date.Today.Month, 1) d1= d1.AddMonths(-1) d2 = d2.AddDays(-1) Dim filter = "日期 >= #" & d1 & "# And 日期 <= #" & d2 & "#" DataTables("冲压车间工资表").ReplaceFor("_Locked", True, filter)