1、试试If e.DataCol.Name = "项目号" AndAlso e.OldValue IsNot Nothing AndAlso e.OldValue <> e.NewValue Then
改为
If e.DataCol.Name = "项目号" Then
If e.OldValue IsNot Nothing AndAlso e.OldValue <> e.NewValue Then
'其它代码
end if
end if
或者自行跟踪一下看是那一句代码有问题,调试技巧:http://www.foxtable.com/webhelp/scr/1485.htm
2、
If e.DataCol.name="开piao日期" orelse e.DataCol.name="客户"Then
If e.DataRow("客户")="瑞博"
e.DataRow("应结款日期")=e.DataRow("开piao日期").adddays(60)
End If
End If