本文介绍了如何定义循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, 可以有人给我正确的语法来定义使用 表单'记录集的循环,只要它不在最后这个桌子? 例子: 做的不是EOF''这是我不知道的部分 命令.... ..... ..... 循环 谢谢..... 解决方案 Dim rst记录集 设置rst = Currentdb.Openrecordset(" MyTable",dbopendynaset) 如果rst.Recordcount> 0然后 rst.MoveFirst 做的不是rst.EOF ....过程 rst。 MoveNext 循环 Endif rst.close set rst = Nothing 昏暗rst作为记录集设置rst = Currentdb.Openrecordset(" MyTable",dbopendynaset)如果rst.Recordcount> 0然后 rst.MoveFirst 做的不是rst.EOF ....过程 rst.MoveNext 循环 Endif rst .close set rst = Nothing Dim rst Recordset Set rst = Currentdb.Openrecordset(" MyTable",dbopendynaset)如果rst.Recordcount> 0然后 rst.MoveFirst 做的不是rst.EOF ....过程 rst.MoveNext 循环 Endif rst .close 设置rst =没什么 Hello all,Could anybody give me the correct syntax for defining a loop using theform''s recordset for as long as it is not at the end of the table ? example:Do While not EOF '' this is the part I don''t knowcommands ..............Loop Thanks ..... 解决方案 Dim rst As RecordsetSet rst = Currentdb.Openrecordset("MyTable",dbopendynaset)If rst.Recordcount > 0 thenrst.MoveFirstDo while not rst.EOF....processrst.MoveNextLoopEndifrst.closeset rst = Nothing Dim rst As Recordset Set rst = Currentdb.Openrecordset("MyTable",dbopendynaset) If rst.Recordcount > 0 then rst.MoveFirst Do while not rst.EOF ....process rst.MoveNext Loop Endif rst.close set rst = Nothing Dim rst As Recordset Set rst = Currentdb.Openrecordset("MyTable",dbopendynaset) If rst.Recordcount > 0 then rst.MoveFirst Do while not rst.EOF ....process rst.MoveNext Loop Endif rst.close set rst = Nothing 这篇关于如何定义循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-02 02:34