Dim dt As Date = Date.Today.AddDays(4) Dim dr As DataRow = DataTables("订单明细表").Find("交货日期 <= #" & dt & "# And 交货日期 >= #" & Date.Today & "#") If dr IsNot Nothing Then MessageBox.Show("有产品尽快要上模生产了!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Tables("订单明细表").Filter = "交货日期 <= #" & dt & "#" MainTable = Tables("订单明细表") End If