Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Subform Question

Status
Not open for further replies.

MisterEkted

Technical User
Mar 5, 2007
10
US
I am wondering how (or where) Access links the parent/child fields in form/subforms. I would like to re-direct a subform record to be related to a different form record.
Is this possible?
 
Seems like two different questions. How are a form/subform link? In Design view, if you select the subform (squares around the perimeter) and look at the property sheet, you'll see Link Child Fields and Link Master Fields. You'll see the connecting fields.
How do you change the parent of a child? Just change the foreign key in the child record. That should also be the primary key in the parent. In fact, look at your terminology - parent/child, just have another parent adopt the child.
 
I did not create a relationship per se. I created a subform on a tab control of a main form. The subform wizard asked me if I wanted to link parent/child fields. The subform records that are displayed change as the main form record is changed, of course. What I am trying to do is to occasionally change a record from the subform so that it is associated with a differnt main form record. It seems like once a new record is created in the subform, it is permanently associated with the parent record. I must be looking at this thing all wrong.

Thank you for your previous response. I DO appreciate your time and effort.
 
You need to change the association field to the new association:

Example:
[tt]MAIN
CompanyKey: 123

SUB:
CompanyKey Etc Etc
123 abc etc <-- Change 123 to match the new company.
123 defnetc[/tt]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top