Connecting Tech Pros Worldwide Forums | Help | Site Map

How to highlight textbox with the max value

Ellen Manning
Guest
 
Posts: n/a
#1: Nov 13 '05
Using A2K. I've developed a survey form with a number of questions
that have 6 possible responses each. The possible values are 5
(Strongly Agree) down to zero (No Response). I want to develop a
report that looks like this:

<Question 1 text>
Strongly Agree Somewhat Agree ..... No Response
<Count of 5's> <Count of 4's> <Count of zero's>

<Question 2 text>
Strongly Agree Somewhat Agree ..... No Response
<Count of 5's> <Count of 4's> <Count of zero's>

<...and so on...>

I want to highlight the response with the highest count for each
question. Any ideas on how to acheive this without going thru a bunch
of if..then's?

Thanks for any help or advice.

Robert Hogan
Guest
 
Posts: n/a
#2: Nov 13 '05

re: How to highlight textbox with the max value


You could use a recordset with the following query. (I'm assuming you
have a field for each question containing the answers).


SELECT Q1Answer, COUNT(*) AS NoOfAnswers
FROM Table1
GROUP BY Q1Answer
ORDER BY COUNT(*) DESC


The first record of the recordset will contain the answer most given
for question1. You can then use the OnFormat event to highlight
(change the font for example) of the answer.


manning_news@hotmail.com (Ellen Manning) wrote in message news:<da7d13b.0408200656.4a557a7d@posting.google.c om>...[color=blue]
> Using A2K. I've developed a survey form with a number of questions
> that have 6 possible responses each. The possible values are 5
> (Strongly Agree) down to zero (No Response). I want to develop a
> report that looks like this:
>
> <Question 1 text>
> Strongly Agree Somewhat Agree ..... No Response
> <Count of 5's> <Count of 4's> <Count of zero's>
>
> <Question 2 text>
> Strongly Agree Somewhat Agree ..... No Response
> <Count of 5's> <Count of 4's> <Count of zero's>
>
> <...and so on...>
>
> I want to highlight the response with the highest count for each
> question. Any ideas on how to acheive this without going thru a bunch
> of if..then's?
>
> Thanks for any help or advice.[/color]
Closed Thread