Question One-to-many relationship

kicker

Registered User.
Local time
Today, 23:08
Joined
Oct 1, 2008
Messages
16
Hi,


I am trying to link two tables to another table, wich will be the starting table.
Relationship should be one-to-many(records in the main table are going to have many records,or none, from the other two tables), I want to relate them through the ID, wich is auto-number.
There comes a problem after a do this. it is something like one record cannot have one-to-many relationship with two different tables.

these tables, I want them to work in a query.


I am doing something wrong here.

Need help how to implement this???


ThnX in Advance.
 
Are you trying to make a junction table for a many-many relationship?

Generally, you cannot have more than one relationship defined for a given field, though you can define more than one relationship for same table on different fields.

More details will be needed in order to be able to help you. What are you trying to model through this structure? What does those three tables store?
 
I may have misunderstood, but it sounds like you are trying to join the auto number fields (RecordID) in each table. I don't think that's possible (one-to-many). If I am reading correctly, you'll need a foreign key in the sub tables to accomplish this.

Something like:
[Main Table]
RecordID (Primary Key, Auto Number, No Duplicates)
Field1
Field2

[Sub Table 1]
RecordID (Primary Key)
MainRecordID (Foreign Key, Integer, Duplicates allowed)
Field 1
Field 2

[Sub Table 2]
RecordID (Primary Key)
MainRecordID (Foreign Key, Integer, Duplicates allowed)
Field 1
Field 2

Then you can join the main table "RecordID" field with the sub table "MainRecordID" fields with a one-to-many. You can join the main table to each of the two sub tables this way.

If that's not what you are referring to, then Banana is right. Please provide a little more info. :D
 
Last edited:
Thanx Irish634,

I was in a rush, the day that I posted that question.

Your respond sounds like the right answer.

I will try if it works.


ThnX:)
 

Users who are viewing this thread

Back
Top Bottom