Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could somebody help me on Yes/No options 1

Status
Not open for further replies.

zafer

Technical User
Joined
Sep 4, 2002
Messages
2
Location
US
HI, I am a new coldfusion fan and working on a project. My problem is that I am using Microsoft Acces and I have Yes/No options for several questions in my form like below.

Name: Text (David)
Which Channels do you have?
HBO Yes/No (Yes)
Showtime Yes/No (No)
ABC Yes/No (Yes)
Starz Yes/No (No)

(This is just an example.)
What I am tring to do is to output these data like this

"David watches HBO and ABC and doesn't watch Showtime and Starz"

Instead of I am getting "David watches 1 and 1 and doesn't watch 0 and 0"

I am getting the number values instead of the texts. What kind of code do I need to use. How can I do this. Please send an answer as soon as you can. I really appreciate that.
Thx


 
If you want the 1 and 0 to be a Yes or No, just use an if/then statement:
<CFIF HBO eq 1>Yes<CFELSE>No</CFIF>


Or instead of Yes say HBO, otherwise it prints nothing like this:
<CFIF HBO eq 1>HBO<CFELSE></CFIF>
or simply: <CFIF HBO eq 1>HBO</CFIF>

:) David McIntosh

Let me know if this post helped you...
Please click below: &quot;This Post was Helpful&quot;
 
Thanks David, I really appreciate your help. Your answer was really helpful... Also What a coincidence that your name is David like in my example..
:)Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top