Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Problem with a Poll Im designing...

  • 14-03-2007 12:11PM
    #1
    Registered Users, Registered Users 2 Posts: 224 ✭✭


    Hi all,

    Im creating a poll using asp. I got this neat bit of code from the net...


    <%
    'Get Poll Results using Filter
    Dim arrCount(1000)
    For i = 1 to 1000
    FilterParam = i
    rsQryPoll.Filter = "ItemID = " & FilterParam
    'Count results
    While NOT rsQryPoll.EOF
    arrCount(i) = arrCount(i) + 1
    rsQryPoll.MoveNext()
    Wend
    Next
    %>


    <td><div align="center"><%=FormatNumber((arrCount(352)/rsQryPoll_total*100), 2, -2, -2, -2)%>%</div></td>

    So my problem is im trying to make it dynamic so I dont have to manually enter in the above 2nd snippet for every item in the poll. "352" is the itemid.
    This is the field Im trying to work into the code instead of 352.
    <%=(rsItemDetails.Fields.Item("ItemID").Value)%>

    Any suggestions....


Advertisement