Afternoon again all

Right, i am creating a section of our web site which creates surveys and outputs the results with the bolean and multi choice ones outputting as a pretty bar graph, i have the code outputting and creating a graph for one question at a time (here) but i can not get the code to create all results on one page

I have two tables in the db (that deal with bolean) one called questions the other answers (simple see) the answers one stored its own id the question it is the answer too what type of answer it is (boolean or not) the answer and what quiz/survey it is from.
this code will out put

the question how many yes an how many no.

please help!!!!!!
Code:
<%
dim Ycounter
Ycounter = 0
dim Ncounter
Ncounter = 0
%>  
  
<%Do While Not rsas.EOF%>
					<%if rsas("qtype") = "boolean" then%>
<%

if rsas("qid") = questionid then

if rsas("answer") = "y" then
Ycounter = Ycounter + 1  
else
Ncounter = Ncounter + 1
end if

dim qref
qref = (rsas("qid"))
 
end if

%>

<%end if%>
                    
                 
                    
<%rsas.movenext 
Loop
rsas.movefirst%>



<%Do While Not rsqs.EOF%>

<%
if rsqs("ID") = int(qref) then
myq = rsqs("question")
end if
%>

<%rsqs.movenext 
Loop
rsqs.movefirst%>
<blockquote>
  <p><%=myq%></p>
  <blockquote>
    <p><strong>Yes</strong> = <%=Ycounter%></p>
    <p><strong>No</strong> = <%=Ncounter%></p>
      <%dim tot
tot = Ycounter + Ncounter%>
    <p><strong>Total</strong> = <%=tot%></p>
  </blockquote>
</blockquote>