loop in ado rst

J

Jason

Hello,

Can anyone tell me how to loop in a ado based recordset? It does not matter
what i want to loop, just the basic syntax to get to the properties of an
ado rst.

Thnx
 
K

Ken Snell [MVP]

Depends on what you want to loop. . . through the fields in a record,
through the records in the recordset, through the properties of the
recordset, through the properties of a field (or fields) in a record, etc.
 
J

Jason

Hi Ken,

I want to do it all what you mentioned. Do you have an example for all of
them?

Thnx
 
K

Ken Snell [MVP]

A bit broad of a question, don't you think?

OK - some generic things:

Dim something As object.somethingpropertycollectionother
For Each something in object.somethingpropertycollectionother
' code to look at something and do things with it
Next something


Dim lngC As Long
' assumes that object.somethingpropertycollectionother is a zero-based array
For lngC = 0 To object.somethingpropertycollectionother.Count - 1
' code to look at the lngC value in the
object.somethingpropertycollectionother array
Next lngC

--

Ken Snell
<MS ACCESS MVP>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top