Populate Child Table with Foreign key

ExcelGirl1975

New Member
Joined
Nov 10, 2006
Messages
22
I have three tables


tblBuildings - a table of buildings
BldgID(PK)
other fields

tblTactics - a table of building plans 'tactics' (e.g. plans to buy a building)
TacticID (PK) - an autonumber field
BldgID(FK)
other fields

tblCBAs - a table containing the costs to implement the building's tactics
CBAID (PK)
BldgID(FK)
TacticID (FK)
CBA Yr

So each year a building can have a tactic . Each tactic has a CBA associated with it.

I have related the tblTactics to tblCBA by way of tblTactics' primary key: TacticID to represent this relationship.

How do I populate tblCBA with TacticID values from tblTactics that doesn't involve knowing SQL?

(All of the other table fields have been already populated via an excel import)

Thank you!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
If you're doing data entry, use the interface.
Base a form on the main table.
Second form on the child table; set it to Datasheet as the default
In Design view on the main form, drag and drop the subform.
IMMEDIATELY click on the Properties, go to the Data tab, and check to see that the Master and Child fields are populated. If not, put the primary key of the main form into Master, and the foreign key of the subform in the Child fields.
Now, every record you create in the subform will automatically populate the child record's foreign key.

Denis
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top