下面的表事件,前段时间一直能用的,今天增加行就出错,帮看下哪里不对了
For Each dr As DataRow In DataTables("进项fa piao").datarows If dr.isnull("开piao日期")=False Then Dim tp As TimeSpan = Date.today - CDate(dr("开piao日期")) dr("开piao天数") = Math.Round(tp.TotalDays ) End IfNext