From: Chegu Tom on
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


From: Stuart McCall on
"Chegu Tom" <noemail(a)yahoo.com> wrote in message
news:%2339ucxkuKHA.4940(a)TK2MSFTNGP05.phx.gbl...
>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)