table relationship

G

Guest

I have a table for Employees

tblEmployees: EmpID, Name, email

then I have a table for Contracts

tblContracts: ContactNumber, Title, Location, and EmpID as a foreign key

The relationship window make it a 1 to 1 relationship. Why wouldn't it be a
1 to many? I might have 1 employee that is responsible for many contracts,
thus the 1 to many relationship. Did I miss something here?
 
J

John W. Vinson

I have a table for Employees

tblEmployees: EmpID, Name, email

then I have a table for Contracts

tblContracts: ContactNumber, Title, Location, and EmpID as a foreign key

The relationship window make it a 1 to 1 relationship. Why wouldn't it be a
1 to many? I might have 1 employee that is responsible for many contracts,
thus the 1 to many relationship. Did I miss something here?

It sounds like EmpID is set up as the Primary Key of tblContracts, or that you
have created a unique Index on EmpID. You are joining EmpID to EmpID, not to
ContractNumber, I hope?

John W. Vinson [MVP]
 
G

Guest

Once again John, you have saved the day! I had a unique index for EmpID on
the Contracts table, hence the problem. All fixed now.
 

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