Mimi said:
Karl,
In the example provided, we take the mean of age or IQ for all the
subjects
in the group because that is what we are interested in--characterizing the
group. In this case the function looks pretty obvious, something like
AVG(age). But when we take a questionnaire that has say 20 questions, our
tables are designed so that each column represents an item (variable) on
the
questionnaire and the rows represent the people. When we need to take the
mean of all, or a subset of the items, we average across columns.
This has nothing to do with the example you stated of having different
properties of *one* person. This is multiple *different* questions. If you
choose poor table structure, it's kind of your problem. If you want a
spreadsheet, you should be using Excel, not Access.
An example
might be if you have a questionnaire that taps depression. Well, say
items
1,5,8, and 10 (when averaged together) tap severe depression--we would
need
the average of those items to get our "severe" depression score. The
scored
item becomes another column variable.
In a good table design, each question would have a type, which would tell
you how to query and average the different records and average the ones for
each type.
Now, we can continue doing things this way in SPSS or SAS or other related
program, but what I was trying to accomplish this time was to setup the
questionnaire in a user-friendly format in ACCESS and have the patient
answer
the questionnaire on the computer, and when the patient is finished, the
score would be computed behind the scenes.
It is very possible to have a normalized table structure and a user-friendly
interface. That is down to your skill and creativity, not the tool's. One
thing Access does not do well that you're going to need is to be able to
pull an empty recordset of the different questions to enable the user to
fill them out. The secret to that is to create a left join of the questions
with the user's responses to them as the data source to the form. In other
words, write a query that pulls all of the questions, but shows null
responses to them if the question has not been answered.
I hope that answers your question.
A good table structure for something like what you want would be this
QuestionTypes
==========
QuestionTypeID
QuestionTypeDesc
Question
========
QuestionID
QuestionStem
Answers
========
AnswerID
QuestionID
AnswerText
AnswerScore
Users
======
UserID
FirstName
LastName
DOB
IQ
etc.
UserAnswers
==========
UserID
AnswerID
Then you can easily query UserAnswer joined to Question, Answers and
QuestionType to get the average AnswerScore for a given QuestionType.
HTH;
Amy