建个退出按钮,按钮代码vars("tc") = true
加上退出判断
Dim tb1 As Table = Tables("学生信息A_table1")
tb1.Position=0
For Each r As Row In tb1.Rows
if vars("tc") = true then exit for
Dim dr As DataRow = DataTables("学生信息").sqlfind("身份证件号='" & r("身份证件号") & "' and [_identify]<>'" & r("_identify") & "'")
Dim str As String=""
If dr IsNot Nothing
str= str & "身份证号与" & dr("学校名称") & dr("班级") & dr("学生姓名") & "重复;"
End If
If r("学籍号").length<>19
str= str & vbcrlf & "学籍号不规范;"
End If
If r("户籍地址").length<=5
str= str & vbcrlf & "户籍地址不规范;"
End If
r("重复情况")= str
With tb1
.Position = .Position + 1
End With
application.doevents
Next