One Field Multiple Choices

G

Guest

I am creating a database that is a form for others to fill out. One of the
fields is event type and they can choose mutliple events. Our Access support
person at my firm has advised me to use a combo box and list the event
choices however I need to be able to choose more than one. So what I did was
create a field for each choice and make it a yes/no field. Then in my form I
changed this to a checkbox. Is there any other way to have a field that
allows multiple choices or do you need to make each choice its own field?
 
G

Guest

The correct way would be to have a separate table that holds the choices
related to the records in your main form. You could then use a Multiselect
listbox.

You will need code in the AfterUpdate event of the listbox to add/delete
choices in the related table. You will also need code in the Current event of
your form to reload and display the choices (show items as selected).
 
A

Armen Stein

The correct way would be to have a separate table that holds the choices
related to the records in your main form. You could then use a Multiselect
listbox.

You will need code in the AfterUpdate event of the listbox to add/delete
choices in the related table. You will also need code in the Current event of
your form to reload and display the choices (show items as selected).

Or, with little to no code, you can use a subform in continuous view
to show only the already-selected choices. Let the user add a new
value at the bottom using a combobox.

Also, if you want to prevent duplicates, add a unique index to the
choice table on the combination of the main key and the choice key.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 

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