473,587 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a way to link a checkbox to a radio button?

I have four checkboxes. I want only one of them to be checked at a
time. Any ideas?

Aug 4 '06 #1
11 2067
On 4 Aug 2006 15:10:48 -0700, tr************@ gmail.com wrote:
I have four checkboxes. I want only one of them to be checked at a
time. Any ideas?
You can create one Option Group and use Check Boxes instead of Radio
buttons as options.
The table field that the Option Group is bound to will have a value of
1,2,3,4, etc., instead of you having 4 different fields with a value
of -1 or 0 each.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 4 '06 #2
Which might well work.

But why not stick to the standards? Experienced users will just get
confused.

Emily

"fredg" <fg******@examp le.invalidwrote in message
news:tx******** *************** ******@40tude.n et...
On 4 Aug 2006 15:10:48 -0700, tr************@ gmail.com wrote:
>I have four checkboxes. I want only one of them to be checked at a
time. Any ideas?

You can create one Option Group and use Check Boxes instead of Radio
buttons as options.
The table field that the Option Group is bound to will have a value of
1,2,3,4, etc., instead of you having 4 different fields with a value
of -1 or 0 each.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Aug 5 '06 #3
four separate checkboxes on a form will look the same as a single option
group with four checkboxes instead of radio buttons - all you have to do is
set the option group control's BorderStyle property to Transparent, and
delete the control's label, and it looks exactly the same as four unrelated
checkboxes, in form view. the difference, and the advantage, is that the
checkboxes are automatically "mutually exclusive", without the need for any
programming to enforce the rule.

as for the underlying values of 1, 2, 3, 4 which are saved to the table -
the user should never see those anyway, so it shouldn't cause them any
confusion.

also, when a table has four *mutually exclusive* fields, that table is
almost certainly not normalized - the developer is putting data into
fieldnames, when s/he should use one field to hold the single value selected
from four possible choices presented to the user. the solution that fredg
suggested is fully supported by a normalized table design.

hth
"Emily Jones" <em****@hotmail .comwrote in message
news:44******** *************@n ews.aaisp.net.u k...
Which might well work.

But why not stick to the standards? Experienced users will just get
confused.

Emily

"fredg" <fg******@examp le.invalidwrote in message
news:tx******** *************** ******@40tude.n et...
On 4 Aug 2006 15:10:48 -0700, tr************@ gmail.com wrote:
I have four checkboxes. I want only one of them to be checked at a
time. Any ideas?
You can create one Option Group and use Check Boxes instead of Radio
buttons as options.
The table field that the Option Group is bound to will have a value of
1,2,3,4, etc., instead of you having 4 different fields with a value
of -1 or 0 each.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


Aug 5 '06 #4
Users 'expect', consciously or not, that radio buttons will be exclusive,
and check boxes won't.

Depart from that standard if you like. But don't complain when users say
'there's just something about it I don't like'.

I agree about the table design. Looks like it should be a field with 4
possible values. And don't we all know that one day that will become 5
possible values. Though it wasn't actually the OP that suggested that.

Emily.

"tina" <no****@address .comwrote in message
news:nJ******** *************@b gtnsc05-news.ops.worldn et.att.net...
four separate checkboxes on a form will look the same as a single option
group with four checkboxes instead of radio buttons - all you have to do
is
set the option group control's BorderStyle property to Transparent, and
delete the control's label, and it looks exactly the same as four
unrelated
checkboxes, in form view. the difference, and the advantage, is that the
checkboxes are automatically "mutually exclusive", without the need for
any
programming to enforce the rule.

as for the underlying values of 1, 2, 3, 4 which are saved to the table -
the user should never see those anyway, so it shouldn't cause them any
confusion.

also, when a table has four *mutually exclusive* fields, that table is
almost certainly not normalized - the developer is putting data into
fieldnames, when s/he should use one field to hold the single value
selected
from four possible choices presented to the user. the solution that fredg
suggested is fully supported by a normalized table design.

hth
"Emily Jones" <em****@hotmail .comwrote in message
news:44******** *************@n ews.aaisp.net.u k...
>Which might well work.

But why not stick to the standards? Experienced users will just get
confused.

Emily

"fredg" <fg******@examp le.invalidwrote in message
news:tx******* *************** *******@40tude. net...
On 4 Aug 2006 15:10:48 -0700, tr************@ gmail.com wrote:

I have four checkboxes. I want only one of them to be checked at a
time. Any ideas?

You can create one Option Group and use Check Boxes instead of Radio
buttons as options.
The table field that the Option Group is bound to will have a value of
1,2,3,4, etc., instead of you having 4 different fields with a value
of -1 or 0 each.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail



Aug 5 '06 #5
Emily Jones wrote:
Users 'expect', consciously or not, that radio buttons will be exclusive,
and check boxes won't.

Depart from that standard if you like. But don't complain when users say
'there's just something about it I don't like'.
What standard? Where can I find this?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Aug 6 '06 #6
Tim Marshall wrote:
Emily Jones wrote:
Users 'expect', consciously or not, that radio buttons will be
exclusive, and check boxes won't.

Depart from that standard if you like. But don't complain when
users say 'there's just something about it I don't like'.

What standard? Where can I find this?
That is the standard as I understand all GUIs have ever used. Radio Buttons are
exclusive, CheckBoxes are not.

This is from the Microsoft Fundamentals of Designing User Interaction
http://msdn.microsoft.com/library/de...html/part1.asp

Option Buttons
An option button, also referred to as a radio button, represents a single choice
within a limited set of mutually exclusive choices.

Check Boxes
A check box represents an independent or non-exclusive choice.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Aug 6 '06 #7
Rick Brandt wrote:
That is the standard as I understand all GUIs have ever used. Radio Buttons are
exclusive, CheckBoxes are not.

This is from the Microsoft Fundamentals of Designing User Interaction
http://msdn.microsoft.com/library/de...html/part1.asp

Option Buttons
An option button, also referred to as a radio button, represents a single choice
within a limited set of mutually exclusive choices.

Check Boxes
A check box represents an independent or non-exclusive choice.
Thank you Rick,

But I am certain I've seen loads of paper and on line surveys in which
the requested response is "check one".
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Aug 6 '06 #8
Tim Marshall wrote:
>
Thank you Rick,

But I am certain I've seen loads of paper and on line surveys in which
the requested response is "check one".
The world is full of apps that "do it wrong". That doesn't make it correct.

http://homepage.mac.com/bradster/iarchitect/shame.htm
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Aug 6 '06 #9
http://homepage.mac.com/bradster/iar...t/controls.htm

to be precise
"Rick Brandt" <ri*********@ho tmail.comwrote in message
news:v7******** *********@newss vr13.news.prodi gy.com...
Tim Marshall wrote:
>>
Thank you Rick,

But I am certain I've seen loads of paper and on line surveys in which
the requested response is "check one".

The world is full of apps that "do it wrong". That doesn't make it
correct.

http://homepage.mac.com/bradster/iarchitect/shame.htm
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Aug 6 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6206
by: David Wake | last post by:
I have two radio buttons and two checkboxes in a form. I'm trying to write some code so that when a radio button is selected, its corresponding checkbox is disabled. My code looks like this: function radioClicked(index) { document.table_config_form.my_checkbox.disabled = true;
1
2218
by: Kwart246 | last post by:
Hello, Is it possible to use a text link to enable a radio button, just like some windows interfaces, when the text is clicked, the radio button gets selected..... This works for a checkbox: in head: function changeBox(cbox) { box = eval(cbox);
4
7284
by: Steph | last post by:
Hello, Can someone tell me the script to use for having a change on the same page when using checkbox function ? For example, i would to check one condition and display dynamically a button if the condition is checked on the same page. Thanks in advance for your help
2
9187
by: /.. | last post by:
Hi all, I'm working on a report display page that currently uses 5 checkboxlists with a total of 86 items to display values from 5 different tables in an Access database. The page works fine now. On presenting it to the users they pointed out that their users could change the values in the checkboxes and then print them out, ultimately documenting false information.
5
3361
by: tshad | last post by:
Is there a way to allow a user to press a radio button if it is already selected? There is an onCheckedChanged event that fires when the person presses the button and it is isn't selected already. If it is selected, it doesn't fire. This isn't the case with a checkbox. The event fires whether the control is already checked or not. Thanks,
3
4432
by: newjazzharmony | last post by:
Hello group, I want to automatically select a specific checkbox when a user clicks (selects) a specific item in a radiobutton group. Both controls are in the same form. Let's say for argument's sake that the form looks like this (inessential items left out for the sake of clarity): <form name=form1>
2
3483
by: Advo | last post by:
Basically, ive got information in a table for the layout purposes, as its text for a questionnaire What i Need, is for instance when the user click a radio button, that information can be hidden. I tried <div id="myarea" style="visibility:hidden"><STRONG><font color="#4475AA"Question 2:</font></STRONG></divetc
2
2804
by: runway27 | last post by:
i am using a self submitting form <form action="<?php echo $_SERVER; ?>" method="POST" id="test2" name="test1"> i need to do a validation of textfields, checkboxes, radio buttons i am able to read, display and validate textfields after the form has been submitted however i am getting an error for checkbox and radio buttons.
3
2783
by: camdev | last post by:
I have a form with 2 radio buttons and multiple checkboxes (see example below). The one radio button indicates all and the other radio button indicates the user has chosen specific options (checkboxes) from a list. Can I use javascript to automatically select the 2nd radio button if the users clicks on any of the checkboxes? <form name=form1> <input type=radio name=Radio1 value=All> <input type=radio name=Radio1 value=Specific> <input...
3
1945
by: chiku1523 | last post by:
Hi, Please find the following code. In function setAnswers, I am looping with each question. I have inner loop, which is looping for each answers of the questions. If any of the answer for question 1 and question2 is selected this code is working fine. But if None of answer of either question selected, it is not iterating through outer loop. Please help me to point out the error. <html> <head> <style type="text/css"> body...
0
7857
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8220
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7981
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8222
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6632
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2367
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1457
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1194
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.