looping through a datasheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a subform that gets populated with records.

After it is populated I would like to loop through
the records in the recordset.

I know I could create an ADO recordset that exists seperate of the datasheet
that contains the same records as the datasheet by using the same query but
prefer to loop through the data in the datasheet object.

How do I do this.

Also this looping code would exist on the main form and so I would have
to drill down to the subreport to access the data and fields.

thanks

chris
 
Chris said:
I have a subform that gets populated with records.

After it is populated I would like to loop through
the records in the recordset.

I know I could create an ADO recordset that exists seperate of the datasheet
that contains the same records as the datasheet by using the same query but
prefer to loop through the data in the datasheet object.

How do I do this.

Also this looping code would exist on the main form and so I would have
to drill down to the subreport to access the data and fields.


Using DAO:

With Me.subform.Form.RecordsetClone
.MoveFirst
Do Until .EOF
. . .
.MoveNext
Loop
End With
 

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

Back
Top