E
elizabeth baker
Hi. i'm stumped. This is the first database i've tried to build that is
relational. We are planning a series of events. The tables and
relationships relevant to my problem are as follows (hope i can
articulate them clearly). All the relationships have the "enforce
referential integrity" and "cascade delete" boxes checked. i believe i
need a many-many relationship between contacts and events.
tblContacts
ContactID
1-many relationship with tblEventsLink.ContactID
LastName, etc.
tblEventsLink
EventID (composite key with ContactID)
ContactID (composite key with EventID)
tblEvents
EventID
1-many relationship with tblEventsLink.EventID
EventName
EventTypeID
tblEventTypes
EventTypeID
1-many relationship with tblEvents.EventTypeID
EventType
my form (frmContacts) holds all the info needed for each contact. It
also has a subform (sfrmRSVP) with a query (qryRSVP) as its recordsource.
qryRSVP has these three tables--tblEvents, tblEventsLink, tblContacts
--all related as above for a many-many relationship between contacts and
events. The five fields used in the query are:
tblEvents.EventName
tblContacts.LastName
tblEventsLink.RSVP'd
tblEventsLink.Coming
tblEventsLink.HeadCount
sfrmRSVP displays EventName, RSVP, Coming, and HeadCount.
EventName is a combo box with data supplied by tblEvents.
RSVP and Coming are checkboxes, and HeadCount is a textbox.
my intention is to select an event from the combo box,click to indicate
whether or not the contact has RSVP'd, etc.
i can select an event from the combo box but then i get the following
message when trying to save the record:
You cannot add or change a record because
a related record is required in table 'tblEventTypes'.
i can't figure out what is going on here. Any ideas! Please help. Thanks.
e
relational. We are planning a series of events. The tables and
relationships relevant to my problem are as follows (hope i can
articulate them clearly). All the relationships have the "enforce
referential integrity" and "cascade delete" boxes checked. i believe i
need a many-many relationship between contacts and events.
tblContacts
ContactID
1-many relationship with tblEventsLink.ContactID
LastName, etc.
tblEventsLink
EventID (composite key with ContactID)
ContactID (composite key with EventID)
tblEvents
EventID
1-many relationship with tblEventsLink.EventID
EventName
EventTypeID
tblEventTypes
EventTypeID
1-many relationship with tblEvents.EventTypeID
EventType
my form (frmContacts) holds all the info needed for each contact. It
also has a subform (sfrmRSVP) with a query (qryRSVP) as its recordsource.
qryRSVP has these three tables--tblEvents, tblEventsLink, tblContacts
--all related as above for a many-many relationship between contacts and
events. The five fields used in the query are:
tblEvents.EventName
tblContacts.LastName
tblEventsLink.RSVP'd
tblEventsLink.Coming
tblEventsLink.HeadCount
sfrmRSVP displays EventName, RSVP, Coming, and HeadCount.
EventName is a combo box with data supplied by tblEvents.
RSVP and Coming are checkboxes, and HeadCount is a textbox.
my intention is to select an event from the combo box,click to indicate
whether or not the contact has RSVP'd, etc.
i can select an event from the combo box but then i get the following
message when trying to save the record:
You cannot add or change a record because
a related record is required in table 'tblEventTypes'.
i can't figure out what is going on here. Any ideas! Please help. Thanks.
e