Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Vergel,
Thanks a ton.. That's perfect! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On May 1, 3:03 pm, Vergel Adriano
wrote: 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- Hide quoted text - - Show quoted text - Hey Buddy, THaks a lot. It helped me just now |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MS Query Results | Excel Programming | |||
Query Results to UserForm | Excel Programming | |||
Set a PivotCache as the results of a query | Excel Programming | |||
MS Query Limit results | Excel Programming | |||
Query Results | Excel Programming |