Do Option Groups Offer an OTHER Option that Users Can Add Themselves?

T

T. Hulot

Hello, I'm using Access 2003 on a novice level.

I have a question about option groups.

I'd like to know if it's possible to create a set of radio buttons,
check boxes, and/or drop-down lists, with an OTHER option that lets
the user enter a new value.

I know that's possible with Filemaker Pro. If you enable the OTHER
option, a popup window appears that lets you add a new item to the
list. I'm not sure if that applies only to drop-down lists, but it
has come in handy at times.

Can it be done with Access?

If so, what are the rudimentary steps to accomplishing this?

Thank you very much.

T. Hulot
 
J

John Spencer

Yes, you can do this.

You will need an additional field in your table to store the value of Other

You will need code to make the control bound to the other field visible (or
enabled) when the Other item (check, radio button, List, etc). is selected.
The code will need to run both in form's Current event and in the Update
event of the control where you select the other option.

If you have a continuous form, you should be able to use conditional
formatting to control enabling/disabling the control to enter the other
value.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
T

T. Hulot

Hi John, thanks for replying.

I'm a bit of a novice, so please bear with me.

I haven't learned about binding controls to fields yet.
Maybe I'm a step ahead of myself?

Anyway...what sort of code are you referring to? Do I have to write
VBA code, or can the code be created by my making some selections or
choices in a wizard or screen?

Does it require the Expression Builder, or something else?

Honestly, I'm not really sure if I have a continuous form. The
database is simple, with only a few fields, and it's strictly
flat-file.

Is this task I'm attempting easy enough for a novice to do?

Thank you!
 
J

John Spencer

You can use Conditional Formatting if you are willing to see the "OTHER"
field on the form, but it is greyed out. Otherwise, you will need some VBA
code to do this.

If you can see more than one record at a time on your screen then you have a
continuous form. If you have to press a button to change records then you
probably do not have a continuous form.

If you enter data into a form and it is saved, then you have a bound form.
The form is tied to a query or to a table.

Add a new option "OTHER" to your option group.- I'll assume the Option Group
is named Frame22.

Add a new field fldOther to your table (and your query if you are using a
query as the source for the form.
Add a textbox control to your form - (name txtOther)
Click on the textbox and then select Format: Conditional Formatting
In the dialog box, select "Expression Is" from the combobox
Type the following into the blank text box - if your choice for other is
some other value than 2 then put that in the exprssion.
[Frame22] = 2

IF the frame is bound to a field then use the field name instead of the name
of the control [Frame22] would become something like
[PlantType] = 8 'Where 8 is the value you are storing for Other.

If you use a combobox with text values then
[Combobox] = "Other"

CLick on the Enable/Disable button (last button in the group)


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
T

T. Hulot

John,

Thanks for following up with me.

I'll try this over the weekend, and I'll let you know how things turn
out.
 

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