单从表来说的话,这样做可能更直观。不过,最好还是加入一列【是否及时】,利于以后操作。
编写datacolchanged代码
select case e.datacol.name
case "交货日期", "入库日期"
if e.datarow.isnull("交货日期") = false andalso e.datarow.isnull("入库日期") = false then
if e.datarow("入库日期") <= e.datarow("交货日期") then
e.datarow("及时") = true
e.datarow("不及时") = false
else
e.datarow("及时") = false
e.datarow("不及时") = true
end if
end if
end select
[此贴子已经被作者于2014-4-3 16:19:50编辑过]