472,129 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,129 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 10860
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John Davis | last post: by
1 post views Thread by Jerry | last post: by
3 posts views Thread by Harry Haller | last post: by
reply views Thread by leo001 | last post: by

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.