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 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 ??

 
another thing that just occurred to me....
[tt]The grand scheme is to set up two main forms for data entry:
- Contact Details
- Event Participation[/tt]

don't you also need a form to create the events?

Leslie

Come join me at New Mexico Linux Fest!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top