Hi all,
I am tring to loop through a recordset based on a query and
each loop keeps showing the same value. The query itself has 5 records, but my loop keeps displaying the first record (5 times however). Can anyone please point out where I am going wrong in my code.
Thanks in advance,
Mitch...
Dim dbsDBase As DAO.Database
Dim rstServicers As DAO.Recordset
Dim strServicer As String
Set dbsDBase = CurrentDb
Set rstServicers = dbs.OpenRecordset("qryCurrServs")
With rstServicers
Do While Not .EOF
strServicer = DLookup("servicer", "qryCurrServs")
msgbox strServicer
.MoveNext
Loop
.Close
End With
I am tring to loop through a recordset based on a query and
each loop keeps showing the same value. The query itself has 5 records, but my loop keeps displaying the first record (5 times however). Can anyone please point out where I am going wrong in my code.
Thanks in advance,
Mitch...
Dim dbsDBase As DAO.Database
Dim rstServicers As DAO.Recordset
Dim strServicer As String
Set dbsDBase = CurrentDb
Set rstServicers = dbs.OpenRecordset("qryCurrServs")
With rstServicers
Do While Not .EOF
strServicer = DLookup("servicer", "qryCurrServs")
msgbox strServicer
.MoveNext
Loop
.Close
End With