Auto-populate child foreign key from parent key
I have three tables (parent, child, and grandchild tables) that are related to each other using primary and foreign keys.
Parent Table: CollectionSite
Child Table: TrapInfo
Grandchild Table: TestInfo
The screenshot below shows the relationship as follows:
Parent Primary Key to Child Foreign Key:Location_ID_pkey to Location_ID_fkey
Child Primary Key to Grandchild Foreign Key: TrapInfo_ID_pkey to TrapInfo_ID_fkey
How do you automatically populate the child's foreign key (fKey) with the parent's primary key (pKey) after you select "New Record" in the toolbar to take you to the child's layout?
Would you use the same method for automatically populating the grandchild's foreign key (fKey) with the child's primary key (pKey)?