RaunLGoode
Registered User.
- Local time
- Today, 10:46
- Joined
- Feb 18, 2004
- Messages
- 122
I have inherited an Access 2007 database with two tables called “Incidents” and “CorrectiveActions”.
tblIncidents
IncidentID (Auto Numbered Primary Key)
IncidentNumber
Etc.
tblCorrectiveActions
IncidentNumber(Primary Key)
CorrectiveAction(PrimaryKey)
Etc.
There can me more than one CorrectiveAction for each IncidentNumber. (a one to Many relationship)
I want to enforce referential integrity between these two tables with a one to many relationship.
When I try to use the relationship editor I get an error message stating “No unique index found for the referenced field
of the primary table.” If I add the CorrectiveActionNumber to the CorrectiveActions side of the relationship editor, I get a notification that I haven’t picked a matching field on the “Incidents” side of the editor. There is no such field in the “Incidents” table.
Obviously I am inexperienced in Access. What am I doing wrong and how do I enforce referential integrity between these two tables with a one to many relationship? This DB is also accessed via an ASP app, so I would like to avoid adding additional fields etc to the tables if possible.
tblIncidents
IncidentID (Auto Numbered Primary Key)
IncidentNumber
Etc.
tblCorrectiveActions
IncidentNumber(Primary Key)
CorrectiveAction(PrimaryKey)
Etc.
There can me more than one CorrectiveAction for each IncidentNumber. (a one to Many relationship)
I want to enforce referential integrity between these two tables with a one to many relationship.
When I try to use the relationship editor I get an error message stating “No unique index found for the referenced field
of the primary table.” If I add the CorrectiveActionNumber to the CorrectiveActions side of the relationship editor, I get a notification that I haven’t picked a matching field on the “Incidents” side of the editor. There is no such field in the “Incidents” table.
Obviously I am inexperienced in Access. What am I doing wrong and how do I enforce referential integrity between these two tables with a one to many relationship? This DB is also accessed via an ASP app, so I would like to avoid adding additional fields etc to the tables if possible.