RecordSetClone for a subform?

  • Thread starter Thread starter Rick A
  • Start date Start date
R

Rick A

Can you reference the records shown in a subform?

I've tried recordsetclone but that returns everything in the underlying
query. I want to reference just the rows displayed. The results created by
the master/child link.

Thanks,
 
Sure - just make sure that you reference the form of the subform object.
For example, if the subform object is named sfrmOrders:

With Me.sfrmOrders.Form.RecordsetClone
.MoveLast
MsgBox "There are " & .RecordCount & " Records in this recordset"
End With
 
Thanks. That's the key.

--
Rick Allison
Sandra Daigle said:
Sure - just make sure that you reference the form of the subform object.
For example, if the subform object is named sfrmOrders:

With Me.sfrmOrders.Form.RecordsetClone
.MoveLast
MsgBox "There are " & .RecordCount & " Records in this recordset"
End With


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Rick said:
Can you reference the records shown in a subform?

I've tried recordsetclone but that returns everything in the underlying
query. I want to reference just the rows displayed. The results created
by the master/child link.

Thanks,
 

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