yolish
asked on
Web Report from Access
I have an online Survey that has around 20 questions and each question has 4-5 radio buttons. I need to write a report that will count the number of responses per each radio button. Any help or advice would be very helpful. Thanks-
Doesn't this sound like a Record.Count issue... ;-)
That is assuming of course the radio button 'true' is actually recorded to a field.
Mark
That is assuming of course the radio button 'true' is actually recorded to a field.
Mark
ASKER
If you use Record.Count I would have to use about 100 select statements for every option. Thanks
How are you tracking the -1 of the radio button? If it is fact being written to the dB as a true/false, then yes, you would need to do some script writting, I don't think a 100 select statements would be needed, just loop through the fields, do a Record.Count and write the results to a seperate table. This would require a naming convention like radio1, radio2, radio3, ... Then you could loop via;
For Each radio() {
Record.Count...
update dB
}
For Each radio() {
Record.Count...
update dB
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So with this, I would have to name every radio button 'button1' button2', etc.
What is with quest_num?
What is with quest_num?
Ok I had assumed that each option on each question was store in its own column and that question_num was the number of the question (or it could be the question its self)
If on the other hand you are storing just the response to the question in a single field (eg answer 1 stores 1, 2 2 and so on then the SQL will need to change a bit).
Can you post your table structure and I''l confirm the SQL.
Steve
If on the other hand you are storing just the response to the question in a single field (eg answer 1 stores 1, 2 2 and so on then the SQL will need to change a bit).
Can you post your table structure and I''l confirm the SQL.
Steve
Yes, each button would be named button1, button2, button3... cause the value of the question_name, or quest_num is the where clause. The only problem I see with mouatts reply, is that this just returns the values of the buttons fields, not the count of a true value...
Mark
Mark
ASKER
Here it is
UserID
rbSFA
rbEnterprise
rbCustomer
rbBranding
rbCatalogue
rbService
rbDevelopment
And so on
UserID
rbSFA
rbEnterprise
rbCustomer
rbBranding
rbCatalogue
rbService
rbDevelopment
And so on
I'm still not too sure of the structure but if each of the rb fields represents the question and the contents of the field represents the answer then the problem is a bit more complex. In that you will need to to the totaling manually and not within the SQL.
eg
the SQL would be
SELECT rbSFA,rbEnterprise,... FROM mytable
and the loop would be something like
SELECT CASE res("rbSFA")
CASE 1
sfa_tot1:=sfa_tot1+1
CASE 2
sfa_tot2:=sfa_tot2+1
and so on for each question.
If you are going to be doing a lot of number crunching on this you may be better to change your structure so that the response to each question is stored in a seperate record.
HYTH
Steve
eg
the SQL would be
SELECT rbSFA,rbEnterprise,... FROM mytable
and the loop would be something like
SELECT CASE res("rbSFA")
CASE 1
sfa_tot1:=sfa_tot1+1
CASE 2
sfa_tot2:=sfa_tot2+1
and so on for each question.
If you are going to be doing a lot of number crunching on this you may be better to change your structure so that the response to each question is stored in a seperate record.
HYTH
Steve
If you have the survey in html form, send it to me at masseym@javanet.com (with the database if you have that too). I am going to assume ASP is being used with access...