PC Review


Reply
Thread Tools Rate Thread

Questionnaires-Scoring

 
 
Jake
Guest
Posts: n/a
 
      1st Jul 2003
Lee,

For this I'd go with a select case for the gender, then
nest an if statement for the age.

Function AgeGenderScore(Age as Integer, Gender as Integer)
as Integer

Select Case Gender
Case 0 'Male
If Age >=45 and Age < 50 Then
AgeGenderScore = 5
ElseIf Age >=50 and Age < 55
AgeGenderScore = 6
ElseIf '...
End If

Case 1 'Female
If Age >=45 and Age < 50 Then
AgeGenderScore = 2
ElseIf '...
End If
End Select
End Function

Where you fill in the rest of the values under
the "ElseIf"'s.

HTH

Jake



>-----Original Message-----
>
>I am scoring questions from a questionnaire. I am having
>problems with scoring the questions.
>
>this questionnaire scores differently for Male and
>Female.Their is aprox. 4 other variables that decide a
>total score.
>
>I will give example using two variables
>For example:
>if female and age is between 45-49 they score a 2
>if female and age is between 50-54 they score a 3
>if female and age is between 55-59 they score a 4
>
>if male and age is between 45-49 they score a 5
>if male and age is between 50-54 they score a 6
>if male and age is between 55-59 they score a 7
>
>I have a field called gender and it is coded as male=0
>and female =1.(so when I look at my fields it show a 0 or
>a 1 instead of male or female.
>
>Someone helped me a couple of weeks ago with an age
>module but I forgot about male and females score
>differently. Thanks
>
>.
>

 
Reply With Quote
 
 
 
 
Lee
Guest
Posts: n/a
 
      2nd Jul 2003
Thanks Jake
>-----Original Message-----
>Lee,
>
>For this I'd go with a select case for the gender, then
>nest an if statement for the age.
>
>Function AgeGenderScore(Age as Integer, Gender as

Integer)
>as Integer
>
>Select Case Gender
> Case 0 'Male
> If Age >=45 and Age < 50 Then
> AgeGenderScore = 5
> ElseIf Age >=50 and Age < 55
> AgeGenderScore = 6
> ElseIf '...
> End If
>
> Case 1 'Female
> If Age >=45 and Age < 50 Then
> AgeGenderScore = 2
> ElseIf '...
> End If
>End Select
>End Function
>
>Where you fill in the rest of the values under
>the "ElseIf"'s.
>
>HTH
>
>Jake
>
>
>
>>-----Original Message-----
>>
>>I am scoring questions from a questionnaire. I am

having
>>problems with scoring the questions.
>>
>>this questionnaire scores differently for Male and
>>Female.Their is aprox. 4 other variables that decide a
>>total score.
>>
>>I will give example using two variables
>>For example:
>>if female and age is between 45-49 they score a 2
>>if female and age is between 50-54 they score a 3
>>if female and age is between 55-59 they score a 4
>>
>>if male and age is between 45-49 they score a 5
>>if male and age is between 50-54 they score a 6
>>if male and age is between 55-59 they score a 7
>>
>>I have a field called gender and it is coded as male=0
>>and female =1.(so when I look at my fields it show a 0

or
>>a 1 instead of male or female.
>>
>>Someone helped me a couple of weeks ago with an age
>>module but I forgot about male and females score
>>differently. Thanks
>>
>>.
>>

>.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Questionnaires Mai Li Microsoft Excel New Users 0 3rd Dec 2007 08:48 PM
Scoring Questionnaires =?Utf-8?B?Y3V0ZXNjb290MjQ=?= Microsoft Access 1 10th Mar 2006 08:17 PM
Questionnaires =?Utf-8?B?cm9jY29ncmFuZA==?= Microsoft Access Forms 2 16th Feb 2006 06:00 AM
Questionnaires Mark \(InWales\) Microsoft Access Getting Started 6 18th Mar 2005 07:36 AM
Questionnaires in access Lucas Microsoft Access Database Table Design 2 1st Apr 2004 07:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:01 PM.