If e.Sender.Value IsNot Nothing Then For Each dr1 As DataRow In DataTables("托管缴费").select("开始日期 <= #"& e.Sender.Value &"# And 结束日期 >= #"& e.Sender.Value & "#") If DataTables("托管日况").SQLFind("学生编号 = '"& dr1("学生编号") &"' And 托管日期 = #"& e.Sender.Value &"#") Is Nothing Then dr = DataTables("托管日况").AddNew dr("学期") = dr1("学期") dr("托管班级") = dr1("托管班级") dr("学生编号")= dr1("学生编号") dr("托管日期")= e.Sender.Value dr.Save() End If Next End If
|