Subform RecordSource Clone

M

Michael S. Montoya

I have a form which contains Open Orders. I have a subform which contains
the items on order with a field called "QtyReceived". The subform's
recordsource is only showing items on the order which are not completely
received (qtyOrder - qtyRecvd <> 0)

On the parent form, I have a button "btnPost" which is supposed to take the
qtyRecvd and update another table. However, from what I see, I should only
do calcs on items currently in the subforms recordsource (which, as
mentioned, is already "filtered"). I am trying to use the code: Set rst =
Me!frmReceiptsPostingSubform.RecordsetClone where rst is a DAO.RecordSet,
but I get an error that the "object doesnt support this property or method).
I tried using Me("Me!frmReceiptsPostingSubform).RecordsetClone but I
couldn't seem to find the right syntax for that either.

Can anyone offer help on this one?

Thanks.
 
D

Dirk Goldgar

Michael S. Montoya said:
I have a form which contains Open Orders. I have a subform which
contains the items on order with a field called "QtyReceived". The
subform's recordsource is only showing items on the order which are
not completely received (qtyOrder - qtyRecvd <> 0)

On the parent form, I have a button "btnPost" which is supposed to
take the qtyRecvd and update another table. However, from what I
see, I should only do calcs on items currently in the subforms
recordsource (which, as mentioned, is already "filtered"). I am
trying to use the code: Set rst =
Me!frmReceiptsPostingSubform.RecordsetClone where rst is a
DAO.RecordSet, but I get an error that the "object doesnt support
this property or method). I tried using
Me("Me!frmReceiptsPostingSubform).RecordsetClone but I couldn't seem
to find the right syntax for that either.

Can anyone offer help on this one?

Thanks.

You need to go one step deeper. You've been trying to get the
RecordsetClone from the subform object, but that object is just a
control that contains a Form object. You need to get down to the
subform's Form object:

Set rst = Me!frmReceiptsPostingSubform.Form.RecordsetClone
 

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

Top