> =
Dim dr1 As Row = Tables("表A").Current
Dim dr2 As Row = Tables("表B").Addnew()
For Each dc As Col in Tables("表B").Cols
dr2(dc.name) = dr1(dc.name)
Next
Tables("表A").Current.Delete< =
Dim dr1 As Row = Tables("表B").Current
Dim dr2 As Row = Tables("表A").Addnew()
For Each dc As Col in Tables("表A").Cols
dr2(dc.name) = dr1(dc.name)
Next
Tables("表B").Current.Delete后两个不删除原数据,而且是反复的,那不是数据在反复增加中?
Tables("表B").Current.Delete 这个不是删除功能的,我就是按上面代码编的。出现了原有数据发生了变化,但没有找到原因。所以才请教各位!不知说法是否有误?
以下是引用baoxyang在2009-5-19 14:57:00的发言:
Tables("表B").Current.Delete 这个不是删除功能的,我就是按上面代码编的。出现了原有数据发生了变化,但没有找到原因。所以才请教各位!不知说法是否有误?
看4楼
本人本想利用显示行或隐藏行来达到以上效果的。但老大说,没有显示第几行的功能,所以才用过,With Tables("表A")
For i As Integer = .Rows.Count -1 To 0 Step -1
Dim r1 As Row = .Rows(i)
Dim r2 As Row = Tables("表B").AddNew
For Each c As Col In .Cols
r2(c.name) = r1(c.name)
Next
r1.Delete
Next
End With
但发现原有数据不知为啥,发生了改变。其中表A中的列数与表B中的列数是不一致的。不知是这个原因。