我想在当前表选定行下面的75行记录复制到另外一个表“本二志愿”,不管我选定第几行,总会把当前表的第一行记录复制过去,请老师帮我看看代码,问题出在哪里呀?
Dim bm As String=CurrentTable.Name
Dim r As Row = Tables(bm).Current
Dim i As Integer
Dim j As Integer=0
i=r.Index
DataTables("本二志愿").DeleteFor("_Identify>0")
DataTables("本二志愿").save()
For Each dr2 As Row In Tables(bm).Rows
If (dr2.Index>= i And dr2("计划_今年")>0 And j<75) Then
Dim nr As DataRow = DataTables("本二志愿").AddNew()
For Each dc As DataCol In DataTables(bm).DataCols
nr(dc.name) = dr2(dc.name)
Next
j=j+1
'i=dr2.Index
End If
Next
DataTables("本二志愿").save()
MainTable=Tables("本二志愿")