• Multi Select List Box

    Author
    Topic
    #351855

    How do I get a list box to allow the user to select more than one option. I set the multi-select to extended, but I still can’t select more than one item. In fact, whatever I do select will carry through to the other records. Any suggestions?

    Viewing 0 reply threads
    Author
    Replies
    • #510301

      Extended multiselect allows you to use the SHIFT key to select multiple items by dragging the mouse, using the arrow keys, etc. If you just click an item, the listbox behaves as if multiselect were turned off and selects only that item, deselecting all others. With extended, you have to press the CTL key when you click an item in order to select it in addition to other selections or the SHIFT key to select a continuous range of items.

      • #510473

        Thanks, Charlotte. I knew that, but it still isn’t keeping the selections I make. I have used the shift-click to select 3 items, and when I move to the next field, my selections either disappear, or they are the same for all records in the database. Does that explain my question better?

        • #510480

          Multiselect Listboxes are input devices and will not display the underlying field contents if it contains multiple values. Furthermore, they aren’t really useful in data entry, since you wind up with multiple answers in the same field, which violates relational design principles.

          It explains that your listbox is bound to a field and you’re using a continuous form. listboxes and comboboxes always behave like this but in a single form interface, you can’t see the rest of the records. This is not going to work on a continuous form even if you unbind the listbox and create code to populate it. Continuous forms look like they contain multiple instances of a control, but in fact, they contain only one, as you see when you look at the form detail section in design view. So when you change the value for the current record, you’re changing the only control there is to hold that value, and that change is reflected, but NOT captured in the other records displayed.

          • #510481

            Ok. That makes sense. I guess my thinking is all awry then. Maybe you can suggest a solution to my dilemma. I have a database that is used to track permits issued for land use. I have a group of items for the authorized use (boat launch, recreation, conservation, dam, etc.). Sometimes, I need to select more than one of these items for one permit issued.

            How can I do that? I originally set up an option group with radio buttons, but soon discoverd that I can only select one item. Then I read about the mulit-select list box and thought was the answer.

            I apologize for my ignorance here and appreciate any suggestions you might have.

            I am now thinking I might have to set up a separate table for the results and have them linked to the main table and on the form just have a sub form to enter each item separately. Make sense? I’m still thinking this through.

            Thanks!!

            • #510483

              In your main (Permits) table, why not include a Yes/No field for each type of authorized use. On your input form, show each of these Yes/No fields and allow the user to toggle the Yes/No field where applicable. Does that work for you ?

            • #510513

              Might work. I’ll play with it and let you know. I need to be able to count them at the end of the month. For instance, how many dam permits were there for January? I think with your yes/no, I can still create a query to count.

              Thanks for the idea. I’ll try it.

            • #510528

              Separate table is the relational way to go!

            • #510644

              Thanks to all for your suggestions. I ended up setting up a separate drop down list table to select the items individually and have the results stored in another separate table – linked by a record number to the main table. I created a form for the results, and included that form as a subform in my main data entry form. I’m sure my explanation doesn’t make sense to you, but rest assured, it works beautifully.
              Thanks again!

    Viewing 0 reply threads
    Reply To: Multi Select List Box

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: