many to many relationship

G

Guest

Hi,
I have two tables, tableA and tableB, they have a many to many relationship
so i have a third table tabelAB.
Now I want to create a form where i choose from a combobox from tableA, and
under that I whant to have a subform where information in tableB, connected
through tableAB shows.
Hope some out there can help me
 
B

BruceM

It would help if you say something about the real-world data you are trying
to organize, and a bit more about your database's structure. The junction
table in a many-to-many relationship needs to have fields that are related
to the primary keys in the other two tables. Typically the main form will
be based on one of the tables, the subform will be based on the junction
table, and a combo box on the subform will be based on the third table.
 
V

Van T. Dinh

The RecordSource for the MainForm should be based on tblA (or a query based
on tblA. The RecordSource for the Subform is a Query combining tblAB and
tblB. This Query provides the ForeignKey Field(s) from tblAB to tblA which
you can use as the LinkChildFields for the Subform to go with the PrimaryKey
(being used as the LinkMasterFields) in the MainForm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top