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!

Form with subforms for tables that show many-to-many relationships

Status
Not open for further replies.

bbga

Programmer
Feb 24, 2001
1
US
Hi, I am going to try to explain my problem. I have the following tables:

- TEACHER(tchr_id, nme, lst_nme)
- PHONE(phne_id, phne_nmber)
- ADDRESS(addrss_id, addrs_nmbr)

The relationship between TEACHER and PHONE is many-to-many, as well as the relationshion between TEACHER and ADDRESS. Therefore I have also these junction tables:

- TEACHER_PHONE(tchr_id, phne_id)
- TEACHER_ADDRESS(thcr_id, addrss_id)

I want a form that has to subforms, showing the data in table TEACHER, as well as the data in PHONE and ADDRESS. The main form is to display the data in TEACHER, and each one of the two subforms is to display the data in PHONE and ADDRESS.

Is it possible to do that? Thank you in advance for your answer.

 
For the phone subform make sure you have the link table (TEACHER_PHONE) included in the underlying recordsource property(hopefully you've already set the relationship but if not just drag the phne_id field from one table and drop it on the other). In the subform's LinkChild and LinkMaster properties put the tchr_id for both. Do the same thing for the address subform.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top