re-using a subform

G

Grip

Is it possible to re-use a subform on the same parent form?

I've got tblMemberships which always have values in two fields, OrgID
and PeopleID. I've got tblEmail which has two fields, OrgID and
PeopleID, but only one is ever populated.

I want to have a subform, fsubEmail and use it on the parent form
frmMemberships. I want to use it twice, once linking the OrgIDs and
once linking the PeopleIDs, but I can't get consistent results.

When I try to Link the fields in the property box of the second
instance of the sub form, I get an error, "The expression you entered
refers to an object that is closed or doesn't exist."

Thanks,
G
 
D

Dirk Goldgar

Grip said:
Is it possible to re-use a subform on the same parent form?

I've got tblMemberships which always have values in two fields, OrgID
and PeopleID. I've got tblEmail which has two fields, OrgID and
PeopleID, but only one is ever populated.

I want to have a subform, fsubEmail and use it on the parent form
frmMemberships. I want to use it twice, once linking the OrgIDs and
once linking the PeopleIDs, but I can't get consistent results.

When I try to Link the fields in the property box of the second
instance of the sub form, I get an error, "The expression you entered
refers to an object that is closed or doesn't exist."


It seems to me that this should work, if you set it up right. You can
certainly use the same subform multiple times on a parent form, with
different linking fields. Are you saying that you had one of the subform
controls set up with Link Master & Child fields set up as OrgID linked to
OrgID, and another one set to link PeopleID to PeopleID?

Does the form object that you're using as your subforms's Source Object
include both OrgID and PeopleID in its RecordSource?
 
G

Grip

It seems to me that this should work, if you set it up right.  You can
certainly use the same subform multiple times on a parent form, with
different linking fields.  Are you saying that you had one of the subform
controls set up with Link Master & Child fields set up as OrgID linked to
OrgID, and another one set to link PeopleID to PeopleID?

Does the form object that you're using as your subforms's Source Object
include both OrgID and PeopleID in its RecordSource?

I've double checked all the Sources and they seem fine.

The issue, I've discovered, is with the Subform Field Linker. If I
hand-type the Link Master and Link Child values, I can get the link to
stick. If I use the Linker ("...") button, I get the above error.

Thanks for your help.

G
 
D

Dirk Goldgar

Grip said:
The issue, I've discovered, is with the Subform Field Linker. If I
hand-type the Link Master and Link Child values, I can get the link to
stick. If I use the Linker ("...") button, I get the above error.

That sounds like a bug, or at least an odd limitation in the linker wizard.
I don't believe I've ever used that wizard, though, so if you can key the
values in manually and get them to stick, that's what I'd do.
 
S

S.Clark

I was able to implement this successfully... in 2007. (Never tried to do
this, so 'way cool' concept.)
What is the data value that you're entering that causes the error?
 

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