此主题相关图片如下:序号.jpg
问题一:只要简单的序号,在每个明细自动生成如记录顺序号,比如:1、2、3、、、、、,如何实现?
问题二:用下代码实现,在每个明细自动生成如记录顺序号,比如:1、2、3、、、、、,如何实现?
Dim Cols3() As String = {"第一列", "第二列"}'
Dim Cols4() As String = {"第一列", "第二列"}'
For Each dr3 As DataRow In DataTables("表A").Select("[选中] = 1 ")'
Dim dr4 As Row = Tables("表B").AddNew() '
For r As Integer = 0 To Cols3.Length - 1
dr4(Cols4(r)) = dr3(Cols3(r))
Next
dr4(序号)如何实现?
Next
编程基础:
http://www.foxtable.com/webhelp/topics/0225.htm
For i As Integer = 0 To drs .Count - 1
Dim dr3 As Row = drs(i)
Dim dr4 As Row = Tables("表B").AddNew() '
For r As Integer = 0 To Cols3.Length - 1
dr4(Cols4(r)) = dr3(Cols3(r))
Next
dr4(序号) = (i+1)
Next