Solved

Options Buttons Misbehaving....

Posted on 2004-10-12
11
168 Views
Last Modified: 2010-04-25
I have a form created with Dreamweaver that has standard Yes/No option buttons that are allowing the user to choose both options.  I've not encountered this before.  Anyone know how to fix it?
0
Comment
Question by:johnson00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 14

Expert Comment

by:Esopo
ID: 12292004
What do you call standard Yes/No buttons? Would you mind to post some code?
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 12294390
try set the Yes/No option buttons with same name?
0
 
LVL 2

Author Comment

by:johnson00
ID: 12297781
They have the same name, and both are currently set to return True as a value, as when I returned False as a value to my Access database, the report did not pick up the "false" and mark that option button.  Does that make sense?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 2

Author Comment

by:johnson00
ID: 12301326
<INPUT TYPE="radio" NAME="SCEmployedY" VALUE="TRUE">
        Yes
        <INPUT TYPE="radio" NAME="SCEmployedN" VALUE="TRUE">
        No

I guess they are named differently.  I had difficulty getting them to return to a database correctly when they were named the same.  I need this value to correctly populate a radio button in an access report, which is why I split them up.  How SHOULD I have done this?
0
 
LVL 2

Author Comment

by:johnson00
ID: 12301330
Points increased
0
 
LVL 14

Expert Comment

by:Esopo
ID: 12303154
I think I understand what you want. First of all, how do you spect different returns if they both have TRUE as the value?

Give the radio options the same name and different values, exmpl:

 <INPUT TYPE="radio" NAME="radio1" VALUE="1"> Yes
 <INPUT TYPE="radio" NAME="radio1" VALUE="0"> No

Now, in ASP chech for the variable ("radio1" in this case) to see which was chosen (either 1 or 0).

Basically the "radio group" will allow for multiple choice answers and only pass to your ASP the one chosen. You group them by assigning the same name to every element but different values. You should receive it as a single variable (radio1) with a single value (either 1 or 0 for this case).

Is this helping you?
0
 
LVL 14

Expert Comment

by:Esopo
ID: 12303178
BTW: this should work for you but you could use a dropdown list aswell.

These are great to play around with the code:

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_radio

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_select2
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 12304454
>><INPUT TYPE="radio" NAME="SCEmployedY" VALUE="TRUE">
        Yes
        <INPUT TYPE="radio" NAME="SCEmployedN" VALUE="TRUE">
        No

ya, try as:

<INPUT TYPE="radio" NAME="SCEmployed" VALUE="TRUE">
        Yes
        <INPUT TYPE="radio" NAME="SCEmployed" VALUE="FALSE">
        No
0
 
LVL 19

Accepted Solution

by:
webwoman earned 250 total points
ID: 12310287
If you're using an Access database, and you have the field set as a yes/no field, you should use -1 for the true value and 0 for the false.

That's the values Access is looking for. You can't use a string ("TRUE" "FALSE") because that's NOT a text field.
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 12310439
We can still put the value as "true" or "false", as the SQL statement to be executed is just a string, and the statement will recognize the value of "true" or "false", as it's a boolean value. Of course using of "-1" and "0" that webwoman mentioned will always works as well.

cheers ;-)
0
 
LVL 2

Author Comment

by:johnson00
ID: 12312715
webwoman,

that is exactly the information I was looking for.  Thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question