Junction Table for Many to Many Relationship

G

Guest

I am trying to create a many-to-many relationship using a Junction table. I
created the junction table with my two primary ID's from my other tables, and
created a relationship between the primary keys with the junction table being
the "foreign key" and I get back nothing on my datasheet. What am I doing
wrong?
Thanks for any help.
 
J

John Vinson

I am trying to create a many-to-many relationship using a Junction table. I
created the junction table with my two primary ID's from my other tables, and
created a relationship between the primary keys with the junction table being
the "foreign key" and I get back nothing on my datasheet. What am I doing
wrong?
Thanks for any help.

You won't get anything back on the datasheet until you enter some
records into the junction table.

Access has no way of knowing which records in TableA are related to
which records in TableB. You need to enter records in JunctionAB,
putting the foreign keys for the appropriate records in TableA and
TableB.

One convenient way to do this is to use a Form with a Subform. Base
the Form on TableA, and the Subform on JunctionAB; put on the subform
a combo box based on TableB, and use TableA's Primary Key as the
master/child link field. You'll now be able to select which records in
TableB are related to the currently displayed record of TableA.

John W. Vinson[MVP]
 
G

Guest

John- Thanks for the response. I thought the junction table would just pick
up the data in the linked tables. I'll try your steps to populate the
junction table.
 
J

John Vinson

John- Thanks for the response. I thought the junction table would just pick
up the data in the linked tables. I'll try your steps to populate the
junction table.

Well, that would be a bit pointless!

If you have a many to many relationship, that's different from an all
to all relationship!

John W. Vinson[MVP]
 
L

Larry Daugherty

Blazing insight! THATs what Dirk Gently meant about 'the interconnectedness
of all things' in "The Restaurant at the End of the Galaxy" :-())
 
J

John Vinson

Blazing insight! THATs what Dirk Gently meant about 'the interconnectedness
of all things' in "The Restaurant at the End of the Galaxy" :-())

SELECT Universe.ElementaryParticle, Universe_1.ElementaryParticle,
Sqr(([Universe].[Xpos] - [Universe1].[XPos]) ^ 2
+ ([Universe].[Ypos] - [Universe1].[YPos]) ^ 2
+ ([Universe].[Zpos] - [Universe1].[ZPos]) ^ 2
- ([Universe].[Tpos] - [Universe1].[TPos]) ^ 2) AS Dist
FROM Universe, Universe AS Universe_1;

ERROR 42: Memory overflow

John W. Vinson[MVP]
 

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