One to many relationship

  • Thread starter Thread starter Guest
  • Start date Start date
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??
 
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?
 
Back
Top