Radio button or check box

A

Alex Martinez

Hello,

I have 5separate fields in my database call:
FP
CO
REV
CK
DIS

What I want to do is to use a radio button in my form that the user will
only select one of the fields I am open to use check box as well or should I
use just only one field that the record only will contain an FP or CO or REV
or CK or DIS. My concern is I don't want to have separate text boxes that
the use can populate more then one text box and memory issues . Any
guidance or help will be appreciated. Thank you in advance.
 
A

Allen Browne

If there are 5 possible choices, and only ONE that should be chosen, you
need ONE field that could contains any of the 5 values.

If you want to interface it with an option group, the values will be
numeric, so:
1. Create a field of type Number, and name it (say) MyChoice.
2. Create a form bound to this table, with an option group bound to this
field.
3. For each of the option buttons in the group, set the Caption of the
attached label to read as you desire.
 
G

Graham Mandeno

Hi Alex

If these five fields represent mutually exclusive options (meaning only
*one* of them can be selected) then they should be in only one field, not
five.

You should assign a numeric code to each value - for example:
1: FP
2: CO
3: REV
4: CK
5: DIS

Then, on your form, add an option group with five options. The options can
be checkboxes or option (radio) buttons or toggle buttons - you choose, it
doesn't matter. The first will have an option value or 1, and a label
caption "FP", and so on.

When you need to display the chosen option (say, in another form or a
report) you can use the Choose function:
=Choose( [MyField], "FP", "CO", "REV", "CK", "DIS" )

If this is not a fixed set of options and you are likely to add new ones
later, then you should add a table to your database with two fields - one
for the numeric code and one for the text. Then, instead of an option
group, you could use a combo box to select the option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top