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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subforms and creating relationships

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Trying to add a history column for each school and put it into a subform for every year, infor will need to be added..Our tech before said i needed to have a parent to child relationship an di can't figure it out
 
If you have a primary key for each school, your history table needs to have a field that relates to this key, e.g.

Schools.ID (Primary Key)
History.ID (Foreign Key)

You don't need to set up the History.ID as a foreign key, just include it and make it the same data type as Schools.ID.

Add a subform control to the main form, then set up the 'Link Child Fields' and 'Link Master Fields' to be these fields. This tells Access to show only the history relating to the currently displayed school in the subform.
Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top