Form Design-Multiple Selections for a List or Drop Down Box

  • Thread starter Thread starter Ella
  • Start date Start date
E

Ella

How can you design a form so you can select more than one
item in a list, combo or drop down box?
 
Ella said:
How can you design a form so you can select more than one
item in a list, combo or drop down box?

You can enable the MultiSelect property of a ListBox. Mind you this
renders the ListBox useless as a bound control and is only used for
examining the choices in code for some reason.

If your goal was an easy way to store multiple values in a single table
field there is no easy solution for that nor should there be as that
violates proper design principles.
 
I am also looking for an answer to the same question.

How is it done for E-mail address selections in Outlook?
That is what I want to do. I this case...I may want to
assign more than one person to a project, so I need both
names in the Assigned to field?????

Any suggestions?
 
I am also looking for an answer to the same question.

How is it done for E-mail address selections in Outlook?
That is what I want to do. I this case...I may want to
assign more than one person to a project, so I need both
names in the Assigned to field?????

You should have two tables. Your current table should have a One-To-Many
relationship with the new table which is where you enter the people
assigned to the project. Then you can have as many as you like. A main
form / sub form should work for data entry. It is "almost never" a good
idea to put more than exactly one value in a single field.
 
Suppose you have a form to enter data into tables. For each record in
the Cases table for which the primary key is Case_ID there can be none,
one, or several entries from a Problem table listing problems, for
which the primary key is Problem_ID. These will go into a Detail table
for which each record will have two fields, Case_ID and Problem_ID
which will be tne multi-part primary key for the Case_Problem_Detail
table. Each of these fields comes from the primary key of eack of the
two tables noted above.

Could someone be kind enough to walk me through the process of
designing the form? On the form there would be a multi-select listbox
presenting a list of Problems from the Problems table. The user would
select none, one, or several Problems from this list. When the user
closed the form or stepped to the next record using the record selector
for the form, the Detail table would be updated with the following: the
Case_ID from the Users table, and the Problem_ID for each of the
problems selected by the user by means of the form.

I know that VBA programming is required to do this. I know that the
Selected, ItemsSelected and other properties of the table are examined.
I just cannot seem to get the fields written to the detail table.

My current (legacy) database violates normalization in that the above
problem is currently "solved" by having fields like Problem1, Problem2,
Problem3, and Problem4. I would like to correct that using the
multiselect listbox technique.

Thanks.

Jim
 
Back
Top