RecordsetClone on a subform

R

Ronald

Hi.
From a subform on a form I need to reach the recordsetclone of another
subform on that form.
I've tried:
Set rst = Forms![<main form>]![<other subform>].RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form.RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].Form.RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form![<other
subform>].Form.RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form![<other
subform>].RecordsetClone

but the 'best' error I get is that the property is not supported.

What contruction will work and why?

Thanks,

Ronald.
 
J

Jon Lewis

The 2nd subform is a subform of the first subform? If so:

Set rst = Forms!nameofMainForm!nameofIst SubFormControl.Form!nameof2nd
SubFormControl.Form.RecordsetClone

Use the names of the subform controls not the subforms.

HTH
 
R

Ronald

If the second subform was within the first one I would have said so.
One of these statements should work, but they do not:
Set rst = Forms![<main form>]![<other subform>].RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form.RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].Form.RecordsetClone

Why?

Jon Lewis said:
The 2nd subform is a subform of the first subform? If so:

Set rst = Forms!nameofMainForm!nameofIst SubFormControl.Form!nameof2nd
SubFormControl.Form.RecordsetClone

Use the names of the subform controls not the subforms.

HTH

Ronald said:
Hi.
From a subform on a form I need to reach the recordsetclone of another
subform on that form.
I've tried:
Set rst = Forms![<main form>]![<other subform>].RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form.RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].Form.RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form![<other
subform>].Form.RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form![<other
subform>].RecordsetClone

but the 'best' error I get is that the property is not supported.

What contruction will work and why?

Thanks,

Ronald.


.
 
S

Stuart McCall

Ronald said:
If the second subform was within the first one I would have said so.
One of these statements should work, but they do not:
Set rst = Forms![<main form>]![<other subform>].RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].RecordsetClone
Set rst = Forms![<main form>]![<other subform>].Form.RecordsetClone
Set rst = Forms![<main form>].Form![<other subform>].Form.RecordsetClone

Why?

If <other subform> refers to the name of a *subform control* on your <main
form>, then:

Set rst = Forms![<main form>]![<other subform>].Form.RecordsetClone

should definitely work.
 

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