View Single Post
  #7  
Old October 29th, 2008, 05:21 AM posted to microsoft.public.access.tablesdbdesign
Ann Scharpf
external usenet poster
 
Posts: 126
Default Establish relationship between tables using TWO fields

John:

I must be doing something wrong. I link the ClinicID fields. Then, when I
try to link the ChildID fields, I get an error that says:

A relationship already exists.
Do you want to edit the existing relationship? To create a new
relationship, click No.

If I click No, I get a ChildData_1 table added in the relationships. If I
click yes, I get a dialog box where I cannot access the ChildID field on the
VisitData table.
--
Ann Scharpf


"John W. Vinson" wrote:


The relationships window can support up to TEN field joins.

Drag the ClinicID to the ClinicID, and the ChildID to the ChildID. Set the
enforcement on both join lines.

I've seen posts about foreign keys and junction tables but I don't quite
understand the foreign key posts and the junction table seems to be for
many-to-many relationships and I am setting up a one-to-many relationship.


Why is there a ClinicID field in the Child table, though? A clinic is not an
attribute of a person; could not the same child be seen at multiple clinics?
Your ClinicVisits table should (I would expect) have a single field
relationship to a table of Clinics (where did this visit occur) and,
separately, a relationship to a table of Children (who visited).
--

John W. Vinson [MVP]