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
 
Back
Top