Hi,
Thanks for your help in advance. Perhaps you have a better solution to this problem.
I have two tables that I want to relate like this...
tblEmployee
EmpID - autonumber PK
FirstName - text
LastName - text
SSN - required, no zero length, Indexed no dupes
tblExam
ExamID - autonumber PK
Date - date
Time - date
SSN - required, no zero length, indexed yes dupes
You can see there is a one to many from the tblEmployee SSN to tblExam SSN so that employees can have many exams.
The exam results are pushed into the tblExam with VBA from data in a text file, and there is no way that the SSN in tblExam can use a look up to get the PK in tblEmployee, so it just goes in as an SSN.
I have created a relationship between these two tables, but when I check Enforce Referential Integrity, I get this error:
"No unique index found for the referenced field of the primary table"
Both SSN fields are indexed. They are linked to one another for purposes of downstream analysis, but I can't link a subform with exam results to the Employee main form. I made the link between fields on the form by SSN/SSN, but the data won't synchronize. When I build a query on these two tables, I can show the data from the tblExam table, but no data from the tblEmployee table, even though all the records from the tblExam table show up... just blank fields for the SSN and PK fields from tblEmployee.
Any help would be greatly appreciated. Perhaps some code for the subform instead of a static data source?
Thanks folks,
P.S. Support tsunami relief through red cross and red crescent (
www.ifrc.org)
mmcdonal