473,545 Members | 4,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Radio Buttons loosing checked state

Hi,

I'm creating a quiz on using a form in VB 2005 express.
I have four sets of questions and answers (labels and radio buttons)
and I change between which set of questions is currently shown on the
form by changing the visible state of the radio buttons and labels
utilising back and next buttons.
E.g. Next button makes current radio buttons and labels invisible and
the next set of radio buttons and labels visible.
Back button makes current radio buttons and labels invisible and the
previous set of questions and labels visible.
The problem occurs when the radio buttons are selected (questions
answered) if I click the back buttons to go back to a previous set of
questions and answers the radio buttons (answers) get reset so none
of
them are selected.
Is there a way to do the above but maintain the checked status
regardless of if the person clicks back or next to review/change
their
answers?
Thanks for any help.

May 10 '07 #1
2 5880
dpazza,

Only one radio button in a group can be selected.

A radio button group is defined by thier container. It sounds like all of
your radio buttons are one big group defined by the form as the container.

You need to place all the radio buttons for a particular question into their
own container, like a groupbox, etc.

Kerry Moorman
"dp****@yahoo.c om" wrote:
Hi,

I'm creating a quiz on using a form in VB 2005 express.
I have four sets of questions and answers (labels and radio buttons)
and I change between which set of questions is currently shown on the
form by changing the visible state of the radio buttons and labels
utilising back and next buttons.
E.g. Next button makes current radio buttons and labels invisible and
the next set of radio buttons and labels visible.
Back button makes current radio buttons and labels invisible and the
previous set of questions and labels visible.
The problem occurs when the radio buttons are selected (questions
answered) if I click the back buttons to go back to a previous set of
questions and answers the radio buttons (answers) get reset so none
of
them are selected.
Is there a way to do the above but maintain the checked status
regardless of if the person clicks back or next to review/change
their
answers?
Thanks for any help.

May 10 '07 #2
On May 10, 10:58 pm, Kerry Moorman
<KerryMoor...@d iscussions.micr osoft.comwrote:
dpazza,

Only one radio button in a group can be selected.

A radio button group is defined by thier container. It sounds like all of
your radio buttons are one big group defined by the form as the container.

You need to place all the radio buttons for a particular question into their
own container, like a groupbox, etc.

Kerry Moorman

"dpa...@yahoo.c om" wrote:
Hi,
I'm creating a quiz on using a form in VB 2005 express.
I have four sets of questions and answers (labels and radio buttons)
and I change between which set of questions is currently shown on the
form by changing the visible state of the radio buttons and labels
utilising back and next buttons.
E.g. Next button makes current radio buttons and labels invisible and
the next set of radio buttons and labels visible.
Back button makes current radio buttons and labels invisible and the
previous set of questions and labels visible.
The problem occurs when the radio buttons are selected (questions
answered) if I click the back buttons to go back to a previous set of
questions and answers the radio buttons (answers) get reset so none
of
them are selected.
Is there a way to do the above but maintain the checked status
regardless of if the person clicks back or next to review/change
their
answers?
Thanks for any help.- Hide quoted text -

- Show quoted text -
Thanks for the reply

The radio buttons are in a group boxes
I have 20 group boxes total
10 group boxes have two radio buttons in them (that gives me true/
false type answers) and 10 with four radio buttons (for multiple
choice)
The problem isnt with selection that part works fine its when clicking
back to previous set of questions and answers that the checked radio
buttons become unchecked.

May 10 '07 #3

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

Similar topics

6
3265
by: Craig Keightley | last post by:
I have a page that has n number of radio groups (yes/No) how can i prevent the form being submitted if more than one radio group is not selected? By default all radio groups are unchecked The problem i am facing is that i do not know how many yes/no radio groups will be generated
5
3081
by: Digital Puer | last post by:
I have the following HTML form: - radio button A (default selected) - radio button B - input field, of type "file" with "Choose" button - submit button I would like to have it so that if the user clicks on the "Choose" button of the input field (to select a file on the local disk), then radio button B is automatically
4
19422
by: Ed Jay | last post by:
I use window.document.form1.myCheckbox.checked=false; to uncheck (reset) several checkboxes. What is an equivalent for resetting a set of interrelated radio boxes? -- Ed Jay (remove M to respond by email)
5
3542
by: Jan Smith | last post by:
I have a C# project that has a tab control with four tab pages. On each tab page is a set of three radio buttons (named radioButton1 through radioButton12). I would like to loop through the radio buttons and set their state without having to form the complete name of each one, something like this: public static void SetButtonState(Form...
7
8708
by: Martijn Mulder | last post by:
How can I put a set of Radio Buttons in a Menu? A bullet list of items where selecting one automatically unselects the others. Thanks
3
5232
by: The alMIGHTY N | last post by:
I have a set of radio buttons that are not clickable in Internet Explorer. I dynamically generated them using DOM functions. The arrValues array below stores integers. obj4 = document.createElement("input"); obj4.name = "f0"; obj4.type = "radio"; obj4.value = 1;
1
3212
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
10
6056
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
5
13142
by: Peted | last post by:
I know you can iterate through a collection of radio buttons in a panel, using a "for each in control" type iteration that c# supports, but is it possible to iterate through the radio buttons collection, as if they were an array of radio buttons ? Basically i want to plonk the radio buttons on a panel then use a for loop to index through...
0
7396
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...
0
7656
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. ...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5968
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...
1
5323
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4943
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3440
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1874
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
0
700
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...

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.