Easy Option Button Question:

E

E.Q.

I hope this is an easy one for someone...
I have a text field that so far only has two options (though more may come).
I wanted to use option buttons on a form for data entry. The two possible
values for the field now are "Process" and "Equipment". I used the option
button wizard and, as I understand it, the wizard set the value associated
with the frame surronding the buttons to either 1 (for "Process") or 2
("equipment"), and it defaults to 1.
I tried to tie the output of the buttons to a bound text box control through
VBA. That sort of worked.
But I also tried to have the radio buttons display the value of the current
record as I paged through; evidently I don't know what event to use for that.
Any help will be appreciated.
[BTW - If my users want to add a third option down the road, I'd probably
end up running the wizard again.. would there be an easier way?]
Peace.
EQC
 
S

Steve Schapel

EQ,

Easiest way is to put (or edit) labels on the option buttons within the
Option Group, to show the "Process" and "Equipment". Leave the Option
Group bound to a field with a Number data type. There is no need to try
and manipulate the value of the Option Group/Number field into text at
that point. When you need to actually display the human-readable text,
which is on reports or other forms, you can easily do this, either in
the query that the form or report is based on, or in the control source
of an unblound textbox on a form or report. Someone can easily show you
how to do this.

When it comes to adding further options in the future, you won't need to
run the wizard again. It is easy to simply add another option button to
the option group, from the toolbox in form design.
 
E

E.Q.

Thanks,
That worked much more simply than anything I was trying. (I ended up
creating a table with two fields, an integer key and a chr for "type"; then
create a relation to link it. I hope that will enable me to give me a path
to keep things readable)
Peace.
EQC

Steve Schapel said:
EQ,

Easiest way is to put (or edit) labels on the option buttons within the
Option Group, to show the "Process" and "Equipment". Leave the Option
Group bound to a field with a Number data type. There is no need to try
and manipulate the value of the Option Group/Number field into text at
that point. When you need to actually display the human-readable text,
which is on reports or other forms, you can easily do this, either in
the query that the form or report is based on, or in the control source
of an unblound textbox on a form or report. Someone can easily show you
how to do this.

When it comes to adding further options in the future, you won't need to
run the wizard again. It is easy to simply add another option button to
the option group, from the toolbox in form design.

--
Steve Schapel, Microsoft Access MVP

E.Q. said:
I hope this is an easy one for someone...
I have a text field that so far only has two options (though more may come).
I wanted to use option buttons on a form for data entry. The two possible
values for the field now are "Process" and "Equipment". I used the option
button wizard and, as I understand it, the wizard set the value associated
with the frame surronding the buttons to either 1 (for "Process") or 2
("equipment"), and it defaults to 1.
I tried to tie the output of the buttons to a bound text box control through
VBA. That sort of worked.
But I also tried to have the radio buttons display the value of the current
record as I paged through; evidently I don't know what event to use for that.
Any help will be appreciated.
[BTW - If my users want to add a third option down the road, I'd probably
end up running the wizard again.. would there be an easier way?]
Peace.
EQC
 
K

Klatuu

Since you may have more options in the future and you have created a table
that will carry the values, I suggest you consider using a combo box rather
than an option group. Then when new options are added, it will require no
change to your form. You just add another row in the table.
--
Dave Hargis, Microsoft Access MVP


E.Q. said:
Thanks,
That worked much more simply than anything I was trying. (I ended up
creating a table with two fields, an integer key and a chr for "type"; then
create a relation to link it. I hope that will enable me to give me a path
to keep things readable)
Peace.
EQC

Steve Schapel said:
EQ,

Easiest way is to put (or edit) labels on the option buttons within the
Option Group, to show the "Process" and "Equipment". Leave the Option
Group bound to a field with a Number data type. There is no need to try
and manipulate the value of the Option Group/Number field into text at
that point. When you need to actually display the human-readable text,
which is on reports or other forms, you can easily do this, either in
the query that the form or report is based on, or in the control source
of an unblound textbox on a form or report. Someone can easily show you
how to do this.

When it comes to adding further options in the future, you won't need to
run the wizard again. It is easy to simply add another option button to
the option group, from the toolbox in form design.

--
Steve Schapel, Microsoft Access MVP

E.Q. said:
I hope this is an easy one for someone...
I have a text field that so far only has two options (though more may come).
I wanted to use option buttons on a form for data entry. The two possible
values for the field now are "Process" and "Equipment". I used the option
button wizard and, as I understand it, the wizard set the value associated
with the frame surronding the buttons to either 1 (for "Process") or 2
("equipment"), and it defaults to 1.
I tried to tie the output of the buttons to a bound text box control through
VBA. That sort of worked.
But I also tried to have the radio buttons display the value of the current
record as I paged through; evidently I don't know what event to use for that.
Any help will be appreciated.
[BTW - If my users want to add a third option down the road, I'd probably
end up running the wizard again.. would there be an easier way?]
Peace.
EQC
 
S

Steve Schapel

I agree, Dave. I really like option groups, and use them a lot. But as
a general rule of thumb I would regard 4 options as the maximum for most
practical purposes, after which they start to become a bit unwieldy and
start to occupy more than their fair share of the screen space etc.
 
K

Klatuu

I agree wholeheartedly. And I am sure you also only use them when the
likelyhood that a change will occur is almost nil.
 
S

Steve Schapel

Absolutely, Dave. Though if the need to add or change an option does
occasionally arise, it's not usually too big a job to tweak the form design.

By the way, Dave, would you be willing to contact me off-line?
Something to ask you... you can get me at
steves at mvps dot org.
 
E

E.Q.

Sorry I didn't get back to this after the question was answered... but in
case anyone revisits.
I build the db using some "user views" supplied by some of my fellow
supervisors. (Excel spreadsheets, a MS-Word form, a hand-written scanned pdf
file). The operations supervisor and engineer provided Excel spreadsheets
with nearly identical column headings, in fact they were virtually identical
except for one column heading. Even if we were going to rely on paper forms I
wouldn't want to use two separate forms...
Its possible that we'll have a couple more options; I have yet to meet with
the guys that gave the hand-written protocol. (Today's meeting cancelled due
to holidays.) For example it wouldn't suprize me to break down the equipment
into "equipment operations" vs "equipment repair" or to have maintenance add
a "mechanical skill" type. Then again, they like to use legal pads for
recordkeeping... I'm just hoping we can sell them on doing things
electronically.
Peace.
EQC
 

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