在一个表的DataColChanged事件中有如下代码:If e.DataCol.Name = "起始日期" Or e.DataCol.Name = "截止日期"
If ( Not e.DataRow("起始日期") = Nothing) And (Not e.DataRow("截止日期") = Nothing) Then
Dim dt1 As Date = e.DataRow("起始日期")
Dim dt2 As Date = e.DataRow("截止日期")
Dim y,m,d As Integer
DateYMD(dt1,dt2,y,m,d)
e.DataRow("执行月数") = y *12 + m +1
Else
e.DataRow("执行月数") = Nothing
End If
End If
部分计算机能正常执行,部分计算机在起始日期或截止日期发生改变时,程序就闪退,不知道是什么原因,头都大了!!
望版主及各路高手帮忙分析一下,谢谢!!!
执行月数字段为Integer型字段,操作系统有win7,win10各种版本都有。