Hallo!
I posted may question in the wrong forum. Here it is again (in the right place):
----------------------------
I have a main table/form called Contacts with details about persons and companies. I want to have a second main form that tracks the scheduled events such as presentations, workshops etc as well as who is going to attend (subform).
I have been able to establish most relationships. The remaining problem is that I cannot link EventId (PK) from table Event- Schedule to EventId (FK) in table Attendance. When I click Create, an error message pops up:
“Access cannot create this relationship and enforce referential integrity…
Here is the overall layout:
Table Contacts
PK = Contact ID
Table Attendance
PK = Attendance ID
FK = Contact ID
FK = Event ID <== problem
Table EventSchedule
PK = Event ID < == problem
FK = EventType ID
Table EventType
PK = EventType ID
The grand scheme is to set up two main forms for data entry:
- Contact Details
- Event Participation
The Event Participation form would consist of two parts:
(a)Main form = description of the event; based on the table EventSchedule
(b)Subform = who is going to participate; based on table EventAttendance. There is also a lookup field in the subform which is linked to table EventType.
How can I make this work?? I suspect that I got one or more Foreign keys wrong – but what is the right way ??
I posted may question in the wrong forum. Here it is again (in the right place):
----------------------------
I have a main table/form called Contacts with details about persons and companies. I want to have a second main form that tracks the scheduled events such as presentations, workshops etc as well as who is going to attend (subform).
I have been able to establish most relationships. The remaining problem is that I cannot link EventId (PK) from table Event- Schedule to EventId (FK) in table Attendance. When I click Create, an error message pops up:
“Access cannot create this relationship and enforce referential integrity…
Here is the overall layout:
Table Contacts
PK = Contact ID
Table Attendance
PK = Attendance ID
FK = Contact ID
FK = Event ID <== problem
Table EventSchedule
PK = Event ID < == problem
FK = EventType ID
Table EventType
PK = EventType ID
The grand scheme is to set up two main forms for data entry:
- Contact Details
- Event Participation
The Event Participation form would consist of two parts:
(a)Main form = description of the event; based on the table EventSchedule
(b)Subform = who is going to participate; based on table EventAttendance. There is also a lookup field in the subform which is linked to table EventType.
How can I make this work?? I suspect that I got one or more Foreign keys wrong – but what is the right way ??