I am trying to code a table in Access that has multipe foreign keys. This is what I have so far:
CREATE TABLE Activities
[actID] Counter NOT NULL,
[stoID] Int NOT NULL,
[TaskOrderID] int NOT NULL,
[actdesc] Varchar(100) NOT NULL,
[acttypeID] Int NOT NULL,
PRIMARY KEY (actID, stoID, TaskOrderID),
FOREIGN KEY (stoID) REFERENCES SubTaskOrders (stoID),
FOREIGN KEY (TaskOrderID) REFERENCES TaskOrders (TaskOrderId),
FOREIGN KEY (acttypeid) REFERENCES ActivityType (acttypeid)
I am getting the error message: “No unique index found for the referenced field of the primary table.”
I know I must be coding this wrong, but I am also not sure what this error message means, or why I am getting it.
I can't wait to hear what I am doing wrong!
Thank you in advance!