Hi Scott,
Try creating a query in your output location like this:
<cfquery name="T-Shirt_1" datasource="server name">
SELECT *
FROM table name
WHERE TshirtOption = 'T-Shirt 1'
</cfquery>
Then put this code where you want the count to appear.
<cfoutput>#T-Shirt_1.recordcount#</cfoutput>
Will that work for you?
> I am creating a web poll. I need assistance with putting poll result
> vote count values in MS Access.
>
> Already got the database created with one record & all I need is a
> count for each option they pick. Option1, Option2, Option3, and etc.
> No other records need to be added. Just need the one row record to be
> updated with the + 1 increment count based on which option they choose.
> Below is the code that I have so far........
>
> Access Demo Fields
>
> Option1 Option 2 Option 3
> Vote Count 0 2 5
>
>
> When user chooses Option1 I want code to make option1 field to +1 to
> the vote to make it 1, 3 for option2 if selected and etc.
>
>
> <form name="tshirt_poll" action="" method="post">
> <table width="349" height="281" align="center" cellpadding="10"
> cellspacing="0">
>
>
> <tr>
> <td width="282"> <div align="center">T-Shirt #1 </div></td>
> <td width="25"><input type="radio" name="TshirtOption" value="T-Shirt
> 1"> </td>
> </tr>
> <tr>
> <td> <div align="center">T-Shirt #2 </div></td>
> <td><input type="radio" name="TshirtOption" value="T-Shirt 2"> </td>
>
> </tr>
>
> <tr>
> <td> <div align="center">T-Shirt #3 </div></td>
> <td><input type="radio" name="TshirtOption" value="T-Shirt 3"> </td>
> </tr>
>
> <tr>
> <td> <div align="center">T-Shirt #4 </div></td>
> <td><input type="radio" name="TshirtOption" value="T-Shirt 4"> </td>
> </tr>
>
> <tr>
> <td> <div align="center">T-Shirt #5 </div></td>
> <td><input type="radio" name="TshirtOption" value="T-Shirt 5"> </td>
> </tr>
>
> <div align="center">
>
>
> <div align="center"></div>
> <tr>
> <td align="center"><input type="submit" name="Submit"
> value="Submit"></td>
> </tr>
>
> </div>
> </table>
> </form>
>
> <cfif TshirtOption IS "T-Shirt 1">
> T-Shirt #1 is Selected
> </cfif>
> <cfif TshirtOption IS "T-Shirt 2">
> T-Shirt #2 is Selected
> </cfif>
>
> <cfif TshirtOption IS "T-Shirt 3">
> T-Shirt #3 is Selected
> </cfif>
>
> <cfif TshirtOption IS "T-Shirt 4">
> T-Shirt #4 is Selected
> </cfif>
> <cfif TshirtOption IS "T-Shirt 5">
> T-Shirt #5 is Selected
> </cfif>
>
>
>
> </body>
> </html>
>
>
> Thanks!
> Scott Clayton
> Programmer/Analyst
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5348
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm