If e.DataCol.Name = "学号" Then '改为: With Tables("学号") 或 If Maintable = Tables("学号") Dim dr1 As DataRow = e.DataRow '改为: Datsrow = DataTables("学号").Datarows(Tables("学号").Current) 或 Dim dr1 As Row = Tables("学号").Current Dim dr2 As DataRow = DataTables("成绩库").Find("[学号] = " & dr1("学号")) If dr2 IsNot Nothing Then dr1("姓名") = dr2("姓名") dr1("班级") = dr2("班级") End If End If '改为: End With
多试一试就知道了···
|