How to store and retreive multilpe values in a multiselect List box in MS Access 2010

Hi,

I have a multiselect List Box on a form in a MS Access 2010 database and I want the user to be able to select one or more values from the box (based on a customer's personal information).

Of course, I want this information (value selections) to save in a child table. Second, I want to be able to retrieve and display the same highlighted selections automatically based on that customer ?

How would I be able to achieve this task ?

Any help would be extremely appreciated.

Thank you !
LVL 20
Daniel Van Der WerkenIndependent ConsultantAsked:
Who is Participating?
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
Then these "specific requirements" will produce a non-standard/counter-intuitive interface that is prone to user missteps, thus requiring multiple levels of validation.

But here you go...
...in an event, I believe this addresses all of your concerns...

JeffCoachman
Database89.mdb
0
 
Jeffrey CoachmanMIS LiasonCommented:
But it is not clear what you are wanting to do here there...

<...I want the user to be able to select one or more values from the box (based on a customer's personal information)...
...Of course, I want this information (value selections) to save in a child table...
...be able to retrieve and display the same highlighted selections automatically based on that customer...>

Please explain in greater detail...
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Jeffrey CoachmanMIS LiasonCommented:
Perhaps it would be simpler for them to simply "enter" this info directly into the child table via a combobox...?
0
 
Daniel Van Der WerkenIndependent ConsultantAuthor Commented:
I have a combobox with 5 values that they may select from. These values are based on a device that a customer is using (for instance, a printer or a scanner or a fax machine, etc.). The user selects however many of these list items that the customer's device operates as.

I want that selection to save in a table and display in the form whenever the user brings up a customer's record.

So if there is a device that functions as a printer and a fax, and the user selects those two functions (and that selection is stored in a table), then I want that selection to display when the user pulls up that specific customer record.
0
 
Daniel Van Der WerkenIndependent ConsultantAuthor Commented:
I am still very new to DB programming and MS Access 2010 and unfortunately for me, the user has requested that they have selections rather than pure text entry fields.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Then this is a compound question.
Design
Build

Try this simple example first
Database89.mdb
0
 
Daniel Van Der WerkenIndependent ConsultantAuthor Commented:
I like your example but let me correct myself.

I have a *listbox, not a combobox. The listbox includes Fax, Printer, Copier, and Scanner.

I already have the listbox built to include those values and the user can select one or more of those. Based on the user's project requirements, one equipment device may actually include any of the features/functions contained in the listbox.

So if the user selected fax and printer for a specific equipment device, I would like that selection stored within a table. Without displaying any IDs on the form, how would I store that in a table ? When you actively select fax and printer from the listbox in the form, those values are highlighted in black. Is there any way that I would be able to display those values as highlighted when the record is displayed in the record ?

My apologies but I suppose this is actually a 3 part question:
1 ) How would a multiselection from a listbox be stored within a table ?
2 ) How can the info be retrieved in the form if the user wants to look at the record (without looking in the table) ?
3 ) How can I display the selection in the record form so that it appears highlilghted in black ?
0
 
Jeffrey CoachmanMIS LiasonCommented:
You can do it but it may be a bit complex if you are new to:
Access
Form design
VBA

My combobox solution will work, ...are you saying that you want what you want regardless of the complexity and if you understood what was being done?
0
 
Daniel Van Der WerkenIndependent ConsultantAuthor Commented:
I have specific requirements from the user, unfortunately, but that's expected. A subform on a form won't quite work for what the client wants.

I have coded some of my DB. If you provide some code with explaination on what it does and where I should put the code and it should be fine.

Any suggestions for coding based on the 3 part question above ?
0
 
Jeffrey CoachmanMIS LiasonCommented:
Thanks...

I did not want to seem like I was trying to give you a hard time.

Just that the design the customer wanted will probably lead to more questions..
:-(

For example
-How to stop the user from clicking the button twice?
-Creating the same system for "removing" devices?
-What happens if you are adding a new Customer?
...etc

Finally note that if you select the same device twice, it will alert you.
I added this validation in myself, ...if I didn't, you would have surely posted another question on how to prevent this...
;-)


Jeff
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.