-- 作者:zgjmost
-- 发布时间:2015/6/16 9:29:00
-- Else drs7.Count = 1 Then怎么报错?
For Each ar7 As Row In Tables("选课数据表").Rows If ar7("纸考安排") = "纸考安排" And ar7("是否排考") <> "不排考" Then Dim drs7 As List(Of DataRow) = DataTables("考试数据表").Select("学号 = \'" & ar7("学号") & "\' and 试卷号 = \'" & ar7("试卷号") & "\' and 保密号 = \'" & ar7("保密号") & "\'", "试卷号")
If drs7.Count > 1 Then drs7(0)("学生类型") = ar7("学生类型") drs7(0)("机考安排") = ar7("机考安排") drs7(0)("备注") = ar7("备注") drs7(0)("考点") = ar7("考点") drs7(0)("时长") = ar7("时长") drs7(0)("是否排考") = ar7("是否排考") For i As Integer = 1 To drs7.Count - 1 drs7(i)("考点") = "" drs7(i)("时长") = "" drs7(i)("是否排考") = "" Next
Else drs7.Count = 1 Then drs7(0)("试卷名称") = ar7("试卷名称") drs7(0)("考试类型") = ar7("考试类型") drs7(0)("考场号") = ar7("考场号") drs7(0)("座位号") = ar7("座位号") drs7(0)("日期") = ar7("日期") drs7(0)("短日期") = 7ar7("短日期")
到红色的地方报错
此主题相关图片如下:qq截图20150616092741.png
想判断行数为1时,执行下面的语句
|