以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]关于新增行的定位  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=41656)

--  作者:czy66ds
--  发布时间:2013/10/24 14:07:00
--  [求助]关于新增行的定位
使用系统命令

Syscmd.Row.AddNews()增加多行后如何定位到新增行的第一行?


--  作者:Bin
--  发布时间:2013/10/24 14:11:00
--  
Dim count As Integer = 10  \'你想增加的行数
Dim ri As Integer
For i As Integer=1 To count
    Dim r As Row = Tables("表A").AddNew
    If i=1 Then
        ri= r.Index
    End If
Next
Tables("表A").Position=ri

--  作者:czy66ds
--  发布时间:2013/10/24 14:16:00
--  
不能事先确定新增多少行啊
--  作者:Bin
--  发布时间:2013/10/24 14:20:00
--  
这个没有确定啊,你想要增加多少行你自己定的啊.
--  作者:Bin
--  发布时间:2013/10/24 14:21:00
--  
Dim count As Integer
If InputValue(count, "增加行", "请输入要增加的行数:") Then
    Dim ri As Integer
    For i As Integer=1 To count
        Dim r As Row = Tables("表A").AddNew
        If i=1 Then
            ri= r.Index
        End If
    Next
    Tables("表A").Position=ri
End If


--  作者:czy66ds
--  发布时间:2013/10/24 14:24:00
--  

谢谢啦