老师您好!经过与其他代码一起运行发现出现问题。“卷1答”表中插入一行并填写“13”后回车会出现一个提示“运行错误”对话框,内容见下图。
此主题相关图片如下:整合7.jpg

输入姓名后,其他表中会出现下图所示,同时还会出现一个相同的提示“运行错误”对话框。请您帮我看看这是什么原因造成的?
此主题相关图片如下:整合8.jpg

运行代码如下:
If e.DataCol.name = "学号" OrElse e.DataCol.name = "姓名" Then
If e.DataRow.IsNull("学号") = False AndAlso e.DataRow.IsNull("姓名") = False Then
Dim cjdr1 As DataRow = DataTables("成绩").Find("学号 = '" & e.DataRow("学号") & "' And 姓名 = '" & e.DataRow("姓名") & "'")
Dim ndr1 As DataRow = DataTables("卷1问").Find("学号 = '" & e.DataRow("学号") & "' And 姓名 = '" & e.DataRow("姓名") & "'")
Dim ndr2 As DataRow = DataTables("卷1频").Find("学号 = '" & e.DataRow("学号") & "' And 姓名 = '" & e.DataRow("姓名") & "'")
If cjdr1 Is Nothing Then
cjdr1 = DataTables("成绩").AddNew
End If
cjdr1("学号") = e.DataRow("学号")
cjdr1("姓名") = e.DataRow("姓名")
If ndr1 Is Nothing Then
ndr1 = DataTables("卷1问").AddNew
End If
ndr1("学号") = e.DataRow("学号")
ndr1("姓名") = e.DataRow("姓名")
If ndr2 Is Nothing Then
ndr2 = DataTables("卷1频").AddNew
End If
ndr2("学号") = e.DataRow("学号")
ndr2("姓名") = e.DataRow("姓名")
End If
End If
Dim kgtcj,zgtcj As Integer '声明记录客观题和主观题成绩变量
Dim cjdr As DataRow = DataTables("成绩").Find("学号 = '" & e.DataRow("学号") & "'" And "姓名 = '" & e.DataRow("姓名") & "'")
For i As Integer = 1 To 3
Dim fkgdr As DataRow = DataTables("客观题答案").find("客观题" & i & " = '" & e.DataRow("客观题" & i) & "' And 试卷号 = '" & DataTables("卷1答").name.Chars(1) & "'")
If fkgdr IsNot Nothing Then
kgtcj + = 1
End If
Next
For i As Integer = 1 To 7
If e.DataRow("主观题" & i ) = "t" Then
zgtcj + = 1
End If
Next
cjdr("卷1") = kgtcj + zgtcj '给成绩表格相关试卷赋分代码
文件如下: