473,839 Members | 1,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Radio Button or Check Box and Event Procedures

Radio Button or Check Box and Event Procedures

I need to insert either radio buttons or check boxes onto my form. I'm
not sure which to use, or if there are other options. I am using the
buttons to: if one is clicked, its corresponding information will
become available on another document, if it's not clicked no
information will be provided. If multiple buttons are clicked their
information will available on the same document.

I'm not sure how to store the information so it will become available
once the button is clicked.

Any help would be greatly appreciated.
Thanks in advance.

Jared
Nov 13 '05 #1
4 11044
Could you be a little more specific... particularly saying what you mean by
"become available on another _document_" and "its corresponding
information". I suspect by 'document', you mean Form or Report, and that
there is _some_ information selectable by the Check Box or Radio Buttion,
but it would be nice to have a less-general description.

Larry Linson
Microsoft Access MVP

"Jared" <jm*****@hotmai l.com> wrote in message
news:96******** *************** ***@posting.goo gle.com...
Radio Button or Check Box and Event Procedures

I need to insert either radio buttons or check boxes onto my form. I'm
not sure which to use, or if there are other options. I am using the
buttons to: if one is clicked, its corresponding information will
become available on another document, if it's not clicked no
information will be provided. If multiple buttons are clicked their
information will available on the same document.

I'm not sure how to store the information so it will become available
once the button is clicked.

Any help would be greatly appreciated.
Thanks in advance.

Jared

Nov 13 '05 #2
jm*****@hotmail .com (Jared) wrote in message news:<96******* *************** ****@posting.go ogle.com>...
Radio Button or Check Box and Event Procedures

I need to insert either radio buttons or check boxes onto my form. I'm
not sure which to use, or if there are other options. I am using the
buttons to: if one is clicked, its corresponding information will
become available on another document, if it's not clicked no
information will be provided. If multiple buttons are clicked their
information will available on the same document.

I'm not sure how to store the information so it will become available
once the button is clicked.

Any help would be greatly appreciated.
Thanks in advance.

Jared


Check boxes, radio buttons (a.k.a. option buttons) and toggle buttons
are all very similar. The name for radio buttons comes from old
fashioned radios in cars where pushing the button for your radio
station caused the other buttons to pop back up. So I use radio
buttons when I have two or more options that are mutually exclusive.
I.e., clicking one 'on' causes the others to click 'off.' Normally a
toggle button is used to indicate an on/off state for a single item.
The toggle is 'up' to indicate one state and 'down' (recessed) to
indicate the other state. A check box is like a toggle when there is
only one box. When there are more than one the user can select
several at a time to indicate several choices at once, in a way that
is similar to the action of a multiselect list box.

From your description it seems like you want check boxes. Since users
get used to certain buttons in windows behaving a certain way I try to
stick to the standards unless I have a good reason to deviate from
them. Also, be careful when using buttons capable of Triple State
(they can have values like True (-1), False (0) and Null). This won't
be an issue if you always set the initial value in code or by using
the Default property but can become an issue if you are setting values
in code based on a recordset field that contains Null values. Use the
Nz() function in that case to specify exactly what value you want the
button to have.

Most of the time all the choices are made before clicking on a command
button that subsequently reads the choices the user made and runs code
that branches according to those choices. A report can also read the
values directly from the open form and use them to adjust itself. The
form can also use the criteria to open one of several different
reports that show different combinations of data fields. Over the
years the people in this NG have done a multitude of different things
with Access so it's important to be as specific as possible about what
you're trying to do.

Hope this helps,
James A. Fortune
Nov 13 '05 #3
An example of what I need. There will be between 15 to 20 options.
Each option will have it's own check box or button. Once the user has
checked the box or boxes that pertain to them, the user will need to
click another button labled, Questions. Depending on which boxes are
checked the corresponding questions for that box will appear in the
form of a report or another type of document, whichever is easiest and
is printable. The user can either answer the questions by typing on
the form or by printing it out and writing on it.

Example of buttons:

A few buttons labled with age ranges, each range having it's own
button. 12-15, 16-18, 19-22, 23-29, 30-39 and so one.

A button asking if the user is a smoker. Yes button, No button

A few buttons labled with hobbies, each having it's own button.
Movies, Sports, Outdoor Activities, Cars, Computers...

Once the user checks the buttons that pertain to them, they will click
a "question" button and this will produce a questionnaire relevant to
the buttons that were checked.

Example:

Say the user check the following buttons, 30-39 age range, Female,
Outdoor Activities, Computers.

The Questionnaire would be populated with pre-assigned questions for
those boxes. Such as,
What brand do you smoke? How many cigarettes do you smoke a day? Do
you like to camp? Do you fish or hunt? Do you own a computer? How many
computers do you own?

The pre-assigned questions will have to be stored somewhere, another
thing I need to figure out.
Hopefully this is more specific and can aid you in helping me.
Nov 13 '05 #4
jm*****@hotmail .com (Jared) wrote in message news:<96******* *************** ****@posting.go ogle.com>...
An example of what I need. There will be between 15 to 20 options.
Each option will have it's own check box or button. Once the user has
checked the box or boxes that pertain to them, the user will need to
click another button labled, Questions. Depending on which boxes are
checked the corresponding questions for that box will appear in the
form of a report or another type of document, whichever is easiest and
is printable. The user can either answer the questions by typing on
the form or by printing it out and writing on it.

Example of buttons:

A few buttons labled with age ranges, each range having it's own
button. 12-15, 16-18, 19-22, 23-29, 30-39 and so one.

A button asking if the user is a smoker. Yes button, No button

A few buttons labled with hobbies, each having it's own button.
Movies, Sports, Outdoor Activities, Cars, Computers...

Once the user checks the buttons that pertain to them, they will click
a "question" button and this will produce a questionnaire relevant to
the buttons that were checked.

Example:

Say the user check the following buttons, 30-39 age range, Female,
Outdoor Activities, Computers.

The Questionnaire would be populated with pre-assigned questions for
those boxes. Such as,
What brand do you smoke? How many cigarettes do you smoke a day? Do
you like to camp? Do you fish or hunt? Do you own a computer? How many
computers do you own?

The pre-assigned questions will have to be stored somewhere, another
thing I need to figure out.
Hopefully this is more specific and can aid you in helping me.


It's much clearer now. BTW, I used to work for a company called
Consumer Pulse, Inc. that created code for computer based interviews.
Since Access and VB weren't naturals for coding computer interviews
they used a program called Ci3 created by Sawtooth Software that also
enabled them to do statistical analysis of the data and create typical
reports. CPI paid me to learn Access 2.0 so that executives at Coca
Cola could easily retrive vending machine survey results for different
geographical regions and other search criteria. They could even
select survey choices on an Access form and show only survey results
with those answers. Try:

tblQuestions
QuestionID Long (primary key)
Question Text

tblControls
ControlID Long (primary key)
ControlName Text

tblQuestionButt on
QBID Long (primary key)
QuestionID Long
ControlID Long

Then use something like (air code):
SELECT Question FROM tblQuestions INNER JOIN tblQuestionButt on ON
tblQuestions.Qu estionID = tblQuestionButt on.QuestionID WHERE
tblQuestionButt on.ControlID IN (1, 5, 7);

would produce the list of questions to ask. tblQuestionButt on would
have a separate line for each question that goes with a control (our
name for an option button, toggle button, etc.). The (1, 5, 7) would
have to be generated in code behind the form that examines which
controls have been selected and produces a list of ControlID's by
using tblControls.

James A. Fortune
Nov 13 '05 #5

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

Similar topics

1
6166
by: sman | last post by:
Hi, I recently read this article on About.com on how to create required fields for a form: http://javascript.about.com/library/scripts/blformvalidate.htm Everything works great except that there are no instructions on how to make checkboxes and radio buttons required. I've tried adding these to my form, but I'm having no luck. Anyone know how to add radio buttons and checkboxes using the existing code mentioned on the url? Thank you!
3
3141
by: John Davis | last post by:
I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons. When the user click the first radio button, the text will change to uppercase. If the user clicks the other radio button, the text will change to lowercase. I added the following event, but still won't able to change the text to uppercase. Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
1
8864
by: Jerry | last post by:
We have a 10-question quiz for kids, each question being a yes or no answer using radio selections. I'd like to keep a current total of yes's and no's at the bottom of the quiz (if the user selects yes to question 1, the total of yes's increases by 1). I've been searching for a while but I'm not sure I'm searching with the right keywords. Can anyone direct me to a source I can review to learn how to do this? Thanks! --
24
4574
by: John Gabriel | last post by:
CreateDialogIndirect() fires my Radio button click function without the radio button having being clicked. I am using VC++ 2003.NET. I believe this is yet another Microsoft bug. Have checked dialog resources and memory - both appear to be in order. Can anyone comment on this? Should CreateDialogIndirect() which is located in dlgcore.cpp ever fire a button click routine??
1
2991
by: Joe Attardi | last post by:
Hi all, On a form on one of my pages I have two <select> elements, and each one is paired up with a radio button. The idea is to choose an item from one list or the other and select the radio button of the list you want to use. I'm using JavaScript to automatically select the radio button corresponding to a list when you click on the list (using the onclick event handler). Is that the best event to change on, or should this
8
2089
by: helpful sql | last post by:
Hi, I have 2 radio buttons on my Windows form control. The radio button's CheckedChanged event disables or enables other controls on the form based on the value of the Checked property. When the form loads, I want to check off one of the radio buttons. So I put the code to check off my radio button in the form's load event. But the CheckedChanged even is not firing. Private Sub ActivityList_Load(ByVal sender As System.Object, ByVal e As...
3
5851
by: Harry Haller | last post by:
I have a radio button group. When the page loads none of them are selected. OnClick selects ONE and clicking another one selects a different one - this is normal behavior. I want to modify it so that clicking on a radio which is already selected will deselect it so that none of the group are selected. I can get the required behavior with a double-click: ondblclick="this.checked=!(this.checked);"
2
2893
by: Peted | last post by:
Hi Im using c# express edition 2005 I have an MDI form, where i load multiple child forms from a dll i create, using reflection and late binding The child forms have multiple radio buttons in a groupbox, and have the appearence set to button
4
3094
by: Z.K. | last post by:
I started a forms application and I put on the form three buttons. In the functions for the radio buttons I put in a single messagebox like: MessageBox("Hello 1") MessageBox("Hello 2") MessageBox("Hello 3")
0
9856
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10589
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10654
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
10298
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...
1
7833
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5683
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4494
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
2
4066
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.