如何通过vba遍历一个表的每一条记录
请问如何通过vba遍历一个表的每一条记录
我需要遍历每一条记录,并对其进行处理,如何做到呢
先得到记录个数,然后循环访问吗,access有没有像excel的Cells(x,y)那样的访问方法阿
我实际的需求是循环遍历一个表的所有记录,从每一行取出几个字段来作为一个函数的参数,并执行之
示例:
set rs=currentdb.openrecordset("select * from tt")
do while not rs.eof
...
rs.movenext
loop
set rs=currentdb.openrecordset("select * from tt")
do while not rs.eof
stra=rs("a")
rs.movenext
loop