recordset clone

  • Thread starter Thread starter Chegu Tom
  • Start date Start date
C

Chegu Tom

I have a main form with a linked subform (combo boxes in the main form
determine the records in the subform)

I have a button on the main form. When that button is clicked, I want to
loop through the records in the subform.

I believe this needs a recorset clone from the subform. How do I reference
that from the main form? I thinki I know how to do the looping once I get
the recordset available

Thanks
 
Chegu Tom said:
I have a main form with a linked subform (combo boxes in the main form
determine the records in the subform)

I have a button on the main form. When that button is clicked, I want to
loop through the records in the subform.

I believe this needs a recorset clone from the subform. How do I
reference that from the main form? I thinki I know how to do the looping
once I get the recordset available

Thanks

Dim rs As DAO.Recordset

Set rs = Me.SubformControlName.Form.RecordsetClone

Do Until rs.EOF
'Process the data
rs.MoveNext
Loop

Set rs = Nothing

(substitute SubformControlName with the actual name of your subform control)
 
Back
Top