Unable to link two tables - TechRepublic
Question
May 10, 2009 at 02:54 PM
eckardtk

Unable to link two tables

by eckardtk . Updated 17 years, 2 months ago

Hallo!
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?? ----------------- Besides the point: I tried to copy and paste a screen shot of the tables window here but I am unable to accomplish that. I had saved the screenshot as a Word file.

This discussion is locked

All Comments