以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  甜老师,帮帮编写循环查看  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=120415)

--  作者:fytea
--  发布时间:2018/6/14 17:18:00
--  甜老师,帮帮编写循环查看

执行完"最后一条"

With Tables("表名")
    .Position = .Rows.Count - 1
End With

命令后,继续执行这条命令,继续从查看第一条开始执行,


--  作者:fytea
--  发布时间:2018/6/14 17:25:00
--  

这样写的问题错在什么地方?

With Tables("表A")
    .Position = .Rows.Count - 1
End With
If Tables("表A").Rows.Count = 0 Then
Tables("表A").Position = 0
End If


--  作者:有点甜
--  发布时间:2018/6/14 17:37:00
--  

dim t as table = Tables("表A")

If t.Rows.Count = t.position+1 Then
    t.Position = 0
else
    t.Position += 1
End If