Hello,
I wonder if someone can help me with this:
I created a sql string to build a query wich works fine . the end result is that I have a query ( qryBuscaB), that returns 11 records
I then want to access every record in the query, like this
Any thoughts ?
I wonder if someone can help me with this:
I created a sql string to build a query wich works fine . the end result is that I have a query ( qryBuscaB), that returns 11 records
I then want to access every record in the query, like this
Code:
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("qryBuscaB", dbOpenDynaset)
MsgBox (rst.RecordCount) ' here I get 1079 and not 11 as it should
With rst
Do While Not .EOF ' once i get to the last record it continues to the first one again
Debug.Print !descMaq & " "; !precoMaq & " " & !Pais
.MoveNext
Loop
End With
Any thoughts ?