Iterating through fields in a recordset

L

Lance McGonigal

Thanks in advance for your help.

Can anyone point me to some code that will let me iterate through the field
of a dynaset using a for each...next loop?

I need this to create a recordset from a crosstab query.

Thanks again.
 
P

Paul Rohorzka

Hi Lance!
Can anyone point me to some code that will let me iterate through the field
of a dynaset using a for each...next loop?

I need this to create a recordset from a crosstab query.

' Assuming DAO, ADO similar:

Dim fld As DAO.Field

For Each fld in MyRst.Fields
Debug.Print fld.Name, fld.Value
Next fld

HTH,
Paul
 

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