Changing master child relationship

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 10 subforms based on 10 tables and one main form (based on another
table). I would like to use a field in each of the subforms to be the master
when linking to the main form. Is this possible?
 
I have 10 subforms based on 10 tables and one main form (based on another
table). I would like to use a field in each of the subforms to be the master
when linking to the main form. Is this possible?

Huh? Your question suggests that you're thinking "upside down" - the
Master Link Field is the name of a field or control on the MAIN form;
the Child Link Field is the matching field in the subform's
recordsource.

Could you explain what you're trying to accomplish, and what's causing
the difficulty?

John W. Vinson[MVP]
 
I want to use the primary key in each of the subforms to link back to the
main form and I won't know the primary key until I enter data in the subform
as it is an autonumber field.

I do have a common field in the master and subform but I want to avoid using
that as all the subforms have the same common field on each of them
 
I want to use the primary key in each of the subforms to link back to the
main form and I won't know the primary key until I enter data in the subform
as it is an autonumber field.

I do have a common field in the master and subform but I want to avoid using
that as all the subforms have the same common field on each of them

I'm sorry, this isn't making any sense.

The *value* of the linking field isn't used in the master or child
link field - you use the *name* of the field.

And it doesn't make sense to link from a mainform to the Primary Key
of a subform's recordsource - when you create a new (autonumber?) PK
value in the Subform's table, there is nothing in the mainform's table
for that value to link TO. Typically, you would link from the Primary
Key of the "one" side table, the main form's recordsource, to a
foreign key field (a Long Integer if the PK is an autonumber) in the
child table.

What is the Recordsource of the mainform?
What are the Recordsources of the subforms?
How are these tables related?


John W. Vinson[MVP]
 
Back
Top