473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 11005
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*****@hotmail.com> wrote in message
news:96**************************@posting.google.c om...
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.google. 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.google. 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

tblQuestionButton
QBID Long (primary key)
QuestionID Long
ControlID Long

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

would produce the list of questions to ask. tblQuestionButton 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
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...
3
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,...
1
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...
24
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...
1
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...
8
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...
3
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...
2
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...
4
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") ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.