📜  VBA 循环遍历记录集 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:56.985000             🧑  作者: Mango

代码示例1
'The short version
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Contacts")
If Not (rs.EOF And rs.BOF) Then
    Do Until rs.EOF = True
        rs.MoveNext
    Loop
End If
rs.Close
Set rs = Nothing