Hi, I have been trying to deal with a potential survey for most of the
day.
I keep returning to Duane Hookom's survey database to try and figure it
out
but ...
I have pretty much imitated his form and subform for response entry.
What's
different is that my survey starts from a Company Table listing address
etc
that I was hoping to just have as a form and my survey be a subform
(linked
by Company ID). I have a question table, an answer table and a response
table. The answer table lists more than one possible answer for the
various
question and I was hoping to create drop down boxes for the response.
All the responses would go to a Response table. Some times the respondent
would be able to select more than one response so there could be more than
record per question.
I have the continuous form for the series of questions working but the
drop
down lists that feed from the Answer table isn't working. Last night I
thought I found someone asking this question but I couldn't find it today.
I
would like the combo box on the subform to just provide the possible
answers
for that question. Here is what I have attempted
SELECT Answers.Answer FROM Answers
WHERE
(((Answers.QuestionID)=[Forms]![frmForm5]![sfrmForm1].[Form]![QuestionID]));
I don't think I am as sophisticated as the other users responding in this
forum, in fact this is my first question. Thank-you for your help. There
are only 10 questions in this survey.
--
Nancy
Duane Hookom said:
The At Your Survey demo does have a "lookup" table that can be used to
provide a list of possible responses for each different question. It is
something like:
QuestionNo PossibleResponse
=========================
1 Red
1 Blue
1 Green
2 Apple
2 Pear
3 Chevrolet
....
--
Duane Hookom
MS Access MVP
On Wed, 23 Aug 2006 12:38:01 -0700, robertm76
Thanks for the link, I got a good idea about how to create a table for
lookup
values, it's still a bit over my head. If I'm just working off one
table
for
my survey do i only need one more table to put the lookup values in?
And
how
do i get the answers to store in the correct table? I'm a little
confused.
It's clear that you didn't actually work with Duane's sample database.
You would not need ANY lookup tables AT ALL.
Rather than your current "spreadsheet" design with one question per
*field*, Duane's database (and any normalized database) will use one
*record* per question. You will need (at least) three tables:
Questionnaire
QuestionnaireID
<information about this questionnaire as a whole, e.g. who filled it
out, when, etc.>
Questions
QuestionNo
Question <Text>
<perhaps fields for the datatype, e.g. yes/no, number, free text,
multiple choice>
Answers
QuestionnaireID
QuestionNo
Answer
If 100 people fill out the questionnaire, and it has 50 questions, the
Answers table will have 100x50 = 5000 rows. There are NO Lookup fields
used or needed.
John W. Vinson[MVP]