Dim dt As Date = Date.Today.AddDays(30) Dim dr As DataRow = DataTables("员工档案").Find("合同到期 <= #" & dt & "#") If dr IsNot Nothing Then MessageBox.Show("有员工合同即将到期!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Forms("员工档案").show() DataTables("员工档案").loadFilter = "合同到期 <= #" & dt & "#" DataTables("员工档案").load End If