Writing a foreign key to multiple subforms

bigalpha

Registered User.
Local time
Today, 15:36
Joined
Jun 22, 2012
Messages
415
I found the following example database in a post on here: LINK

When I filled in data, it did not write the foreign key into the table for each subform. I was wondering why, and if that can be resolved?

I ask because I'd like to set up a form similar to this. Thanks.
 
bigalpha,

The Default Value for the Child table should be --> frmMain!PkField

Wayne
 
The master/child links are not correctly set for all the subforms.

Entering data in the main form will not create records in the subform if that's what you were thinking. You need to go into each subform to create records. When the master/child links are set correctly, Access will automatically populate the FK fields in the subforms.

How should the master/child links be set in this case?
 
Click on the subform control to select it. Open the properties dialog. Make sure the master/child links are set to the correct column names.

This is where I'm having trouble figuring out the master/child links.

If I select the "Mineralization" subform:

I can select from 'MinID', 'MinComment', and 'LithoFK' for the Child Fields.

I can only select from 'HoleID', 'ColorAz', and 'Purpose1' for the Master Fields.

I must be missing something basic here. :banghead:
 

Users who are viewing this thread

Back
Top Bottom