Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to link 2 tables - need help with layout

Status
Not open for further replies.

Calgary2

Technical User
Apr 25, 2009
7
CA
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 ??
 
Thanks for the tip. There was an empty record in the participants table (the database is otherwise empty). So, I did not think of this as a possible problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top