Hi,
I'm trying to modify a survey DB I downloaded from the web, so that it can accept multiple answers per question. The original will only accept one answer for each question.
Here's the link to the original:
http://rogersaccesslibrary.com/forum...4/AYS_2000.zip
I've attached a screenshot of the relationship between tables.
Description of tables:
tblSurveys : Keeps track of which survey this is, e.g. customer service survey, favourite ice-cream flavours survey, etc.
tblSrvRspns: Keeps track of the survey respondents, i.e. the people who took the surveys. E.g. John, Bill, Jane, etc.
tblQuestions : Keeps track of the questions in each survey.
tblResponsesList: Keeps the lists of predefined answers that users can choose from to answer the survey questions. E.g. question is which is your favourite colour, tblResponsesList will have entries for Red, Blue, Green, Yellow, etc.
tblResponses : Keeps the answers that the respondents enter for the questions.
I put a ListBox on a form to allow users to enter multiple answers per question. E.g. on what days do you watch TV? They can select more than one day.
I tried to use code in VBA to store the answers in tblResponses. I got this error message:
"The changes you requested were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."
Is this because I am not allowed to make duplicate entries with the same RspnsID and QstnID in tblResponses?
Question:
How do I modify the tables to be able to handle multiple answers (tblResponses.Rspns) per question?
I thought about this for some time and still can't think of how to do this.
Thanks for any help you can give.