One to many relationship

G

Guest

I have 2 tables. Current Employee and EmployeeFamily. I would like to
create a subform with the family in the employee. When I created a
relationship to link Employee to to EmployeeFamily it does not show one to
many and will not let me cascade. My key fields in the family are LastName &
FirstName with a foreign key of PayrollID. My key field in CurrentEmployee
is PayrollID. What am I doing wrong??
 
G

Graham Mandeno

Hi Mickey

Can you check these things and post back:

1. Are you creating the relationship between the two PayrollID fields?

2. Are they the same data type? (if CurrentEmployee.PayrollID is an
autonumber then "same data type" means EmployeeFamily.PayrollID should be a
long integer)

3. Is EmployeeFamily.PayrollID indexed? (if it doesn't allow duplicates
then the relationship will be one-to-one)

Also, I suggest that LastName/FirstName is not an appropriate primary key
for EmployeeFamily. What happens if John Smith has a wife named Mary and
Susan Smith has a daughter named Mary?
 

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