Weight Total

Ukraine82

Registered User.
Local time
Today, 12:49
Joined
Jun 14, 2004
Messages
346
Is it possible to make a weight score database? I have a database with radio buttons for Yes, No, and N/A. I would like to have a total score that will give you number of questions answered using yes and no only, but have the form divide number of yes by number of questions answered.

For example Form1 has 30 questions, but 25 of the questions were answered by using Yes and No only. 20 questions were answered Yes and 5 were answered No. The final score should give me 20/25 which is 80%.

I already got started on making the tables, queries, and forms. How am I going to start on making the weight total.

Thanks,

Michael
 
My first reaction would be to create a single char text fld and store a, b or c in it. Then each question would be in a frame where three radio buttons. Then you just do counts.

???
ken
 
I broke everything into 3 catorgories. I have my first table for weight, yes=1 no=-1 and N/A=0. My second table is a questionnaire. My third table is data entry table(everything that was typed or entered).

I connected all my tables(relationtionship) by using the AutoNumber(primary key).

The only thing I'm a little confuse on is what's my formula is going to be if I use the total weight score.

Michael
 
In your first table, do you have one field for each question?

kh
 
Yes each field has their own separate questions. This is what I have for weight table.

QuestionW1
QuestionsW2
.
.
.
.
QuestionW25

This is what my question table looks like

Question1
Question2
.
.
.
.
Question25

The data entry table is what I'm going to use in the form that will keep track of all questions that are being answered.

Question1
Question2
.
.
.
.
Question25

I have all my relationship connected to autonumber and question to question.

Michael
 
If this is a do it once and throw away db then my response may be different, but if you intend to do more than just this one questionaire, I would strongly suggest you search this forum for ideas on how to model your tables.

The table structure you posted has a 'repeating' field, the question field, and hence your db is not 'normalized'. If you aren't familiar with this term there is a lot of info on the net on it. I'll spare you may take on normalization...

Take a look at the questionaire dbs referenced in this forum and if you still want to keep your tables the way they are in your previous post, repost and I'll see if we can figure something out...

kh
 
By the way my tables aren't done yet. I'm still making a lot of adjustments to it. But a project like that will take time.

Michael
 
pseudo code:

dim intYes
dim intNo
dim lngScore

if q1=-1 then
intYes = intYes +1
else if q1=1 then
intNo = intNo +1
end if

if q2=-1 then
intYes = intYes +1
else if q2=1 then
intNo = intNo +1
end if

.
.
.

lngScore = intYes/intNo



???
kh
 
Ken,

Thank you for helping me out. I'll give the code a try when I get everything set up.

If you want I'll let you know how everything went.

Thanks again,

Michael
 
Ken,

I got it work. I made a query that gives weight count. By using 1 for yes, -1, for no, and 0 for N/A.

Michael
 

Users who are viewing this thread

Back
Top Bottom