For Each r As Row In t1.Rows r("总件数") = r.DataRow.GetChildRows("第一类履历材料").Count + r.DataRow.GetChildRows("第二个子表名称").Count r("总页数") = t2.DataTable.Compute("sum(页数)","档案编号 = '" & r("档案编号") & "'") + t3.DataTable.Compute("sum(页数)","档案编号 = '" & r("档案编号") & "'") Next