How to iterate through results of SQL Query
David,
try something like this:
While Not rs.EOF
'do something with the current record. i.e.
Debug.Print rs(0)
'move to the next one
rs.MoveNext
Wend
--
Hope that helps.
Vergel Adriano
"David Wessell" wrote:
Hi,
Easy question here, but I'm not finding any examples..
If I've just placed a SQL query, how can I iterate through the results
using VBA?
rs.Open "SELECT * FROM generic table", _
dbMain, adOpenKeyset, adLockPessimistic
---
THanks
David
|