dsc2bjn said:
I am building a questionaire database that will collect answers to
questions
then generate a work-form to allow users to document their corrective
action
plans for any "NO" or "Not Applicable" answers.
There are 83 unique areas of work which I am using as my primary key.
There are about 70 questions that need to be answered by each area of
work.
I tried building a table to store the value for each question, answer, and
their corrective action plan, but creating a data entry form proved
difficult. I tried using a parent form for selecting the area of work
with
separate sub-forms for each question, but it does not populate the area of
work field in each of the question tables.
What you need it something like this:
tblAreas
=======
AreaID (pk)
AreaDesc
AreaEtc.
tblQuestions
=========
QuestionID (pk)
AreaID (foreign key to tblarea)
QuestionStem
tblOptions
=======
OptionID (pk)
QuestionID (fk to tblquestions)
OptionText
IsRight
tblUsers
======
UserId
FirstName
LastName
Etc
tblUserResponses
============
UserId (pk)
OptionID (fk to tbloptions)
So now, open the relationship window and show all your tables. Every place
it says foreign key to the ____ table, click the field in the table where it
is a primary key and drag it to the same field in the table where it is a
foreign key.
You should then be able to create a tblAreas form that has a tblQuestions
subform. Once you have that set up, you should be able to add a tblOptions
subform to the tblQuestions subform that allows you to input the potential
answers that the student could click.
Once all that is good, you'll probably want to create a form that allows
some way to determine the user (whether the user is selected from a drop
down or what) that then jumps you a form that is based on a join between one
or more queries that joins all the questions with the user in question.
That's going to be the tough part, so you should probably post back when
you've gotten to that point. I usually don't use Access at all for that
piece, because Access isn't terribly good at that particular type of task.
But this should get you started up to the point where all your questions are
in the database.
HTH;
Amy