就是在DataColChanged事件中写了如下代码,别的都没有
If e.DataCol.Name = "起始号" Then
If e.NewValue Is Nothing Then
e.DataRow("充值张数") = Nothing
Else
Dim s1 As String = e.DataRow("终止号")
Dim s2 As String = e.DataRow("起始号")
Dim d1 As Integer = cint(s1.substring(s1.length - 6))
Dim d2 As Integer = cint(s2.substring(s2.length - 6))
e.DataRow("充值张数") = d1-d2
Tables("充值凭证表").Save
End If
End If
此主题相关图片如下:截图03.jpg
已解决是数据库的错误
[此贴子已经被作者于2020/9/6 23:10:41编辑过]