James Coats
asked on
MS Access: How to make Parent / Child table relationships
I have been trying to make the following parent child table relationship but can't seem to make it work.
The following table: "tblTools" is the parent, table "tblInspections" is the first child table "tblDimensionVerification" is the second child.
Can someone please help me out with this I keep getting relationship type errors and no index found errors when I try to put foreign key in I don't understand how to make this relationship.
Measuring-Instruments-4-29-11Rev.mdb
The following table: "tblTools" is the parent, table "tblInspections" is the first child table "tblDimensionVerification"
Can someone please help me out with this I keep getting relationship type errors and no index found errors when I try to put foreign key in I don't understand how to make this relationship.
Measuring-Instruments-4-29-11Rev.mdb
did you create a Primary Key (PK) in tblTools. This PK will be the Foreign Key (FK) in the child tables
in table tblInspections, you don't need the DimensionPK field
in table tblDimensionVerification, you don't need the Tool_Pk field
you create the relation between tblInspections and tblDimensionVerification using the InspectionPK field
in table tblDimensionVerification, you don't need the Tool_Pk field
you create the relation between tblInspections and tblDimensionVerification using the InspectionPK field
ASKER
TheHiTechCoach,
Each tool can have many inspection results in the table tblDimensionVerification and many inspections in table tblInspections so I see your point they should be many to one. I don't see any changes in the file.
Capricorn1,
I made changes to the table relationships is this what you mean?? I have attempted to add a record to table tblDimensionVerification but I get an error stating that I can't put in a new record because I have to have a related tool in table tblTools.
see the file.
Measuring-Instruments-4-29-11Rev.mdb
Each tool can have many inspection results in the table tblDimensionVerification and many inspections in table tblInspections so I see your point they should be many to one. I don't see any changes in the file.
Capricorn1,
I made changes to the table relationships is this what you mean?? I have attempted to add a record to table tblDimensionVerification but I get an error stating that I can't put in a new record because I have to have a related tool in table tblTools.
see the file.
Measuring-Instruments-4-29-11Rev.mdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<I have attempted to add a record to table tblDimensionVerification but I get an error stating that I can't put in a new record because I have to have a related tool in table tblTools.>
this is caused by the relationship that you created with referential integrity.
* you can not create a child record without a parent record.
see Referential Integrity from this link for more info
Defining relationships between tables in a Microsoft Access database
http://support.microsoft.com/?kbid=304466
this is caused by the relationship that you created with referential integrity.
* you can not create a child record without a parent record.
see Referential Integrity from this link for more info
Defining relationships between tables in a Microsoft Access database
http://support.microsoft.com/?kbid=304466
ASKER
Thank you very much!!