View Full Version : List box trouble!


angelac
05-22-2001, 10:32 AM
How can I allow a user to select more than one option from a list box and be able to carry the whole selection to the underlying table. When I change the property to allow this, I get a null value. I'm new at access and this is so frustrating! Thanks.

HarmonyGirl
05-22-2001, 11:31 AM
I have never successfully done this, but I think what you need is in the Solutions.mdb sample database that comes with Access.

Check out the example titled "Create a listbox that allows you to select and manipulate multiple objects."

HTH, and good luck!

Pat Hartman
05-22-2001, 04:09 PM
Multiple values should NOT be stored in a single field. Review the articles on database design found in the knowledge base. You have a 1-to-many relationship. Here's a link to one of the articles:
http://www.microsoft.com/TechNet/Access/technote/ac101.asp

angelac
05-24-2001, 05:52 AM
I realize that I shouldn't use more than one entry for a field but this is a field that simply lists a person's disabilities and the user would never need to seperate these. They want this simply to save some typing.
Thanks Harmony Girl, but I don't have access to the CD and don't have the examples installed. Any other suggestions?

Pat Hartman
05-24-2001, 06:43 AM
Never is a long time. When do you think they might want a list of blind people?

You can download solutions and other samples from the download center:
http://www.microsoft.com/downloads/search.asp

Other good Microsoft resources are:
Free stuff - http://www.microsoft.com/accessdev/a-free.htm
Developer's forum - http://www.microsoft.com/officedev/index/database.htm#sample
Knowledge base - http://search.support.microsoft.com/kb/c.asp?fr=0&SD=GN&LN=EN-US

Dawnit
05-24-2001, 03:51 PM
I am having the same problem! In my case, I have one description that may have multiple sub descriptions that apply to to one record. How can I select more than one option from a list box and be able to carry the whole selection to the underlying table? When I change the property to allow this, I get a null value.

If there is a way, whether good to do or not, please share it. Thanks!!!

KevinM
05-24-2001, 04:08 PM
Multiple lists require a separate table linked to the first (one -to - many relationship) and should NOT be stored as one long string in a field or multiple fields in one record.

Dawnit
05-24-2001, 04:15 PM
Okay, thanks! I think I got it.

Let me ask: if I have a list box on my form based on table 1 and I link that to table 2 (one-to-many), and I make a multiple selection in the list box, will the selection be stored in table 2 as you suggested?


I give it a try!