Results 1 to 14 of 14
  1. #1
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    136

    Multi-select with Combo box?


    I have a combo box that I'd like to use MultiSelect. Can I do that or does it need to be a list box? The list box doesn't have the look I prefer.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Combobox would have to be bound to a multi-value field. I do NOT advise using multi-value fields.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    combos are for 1 value.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Like @June7, I would also strongly recommend against using multivalued fields

    However, if you really want to know how to do this, see Multivalued Fields - Mendip Data Systems. Hopefully the article will be enough to dissuade you!

    Multiselect listboxes work in a different way and do not cause any problems
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    136
    Quote Originally Posted by June7 View Post
    Combobox would have to be bound to a multi-value field. I do NOT advise using multi-value fields.

    Ok fair enough. However, when I make it a list box I check multiple options but when I hit save it erases the checkboxes. What am I doing wrong?

  6. #6
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by matey56 View Post
    I have a combo box that I'd like to use MultiSelect. Can I do that or does it need to be a list box? The list box doesn't have the look I prefer.
    Combo boxes do not have a MultiSelect property. List boxes have the MultiSelect property.

    Note that there is a difference between MultiSelect and MFV (multi-value-fields). Multi-value-fields are considered a BAD Design option.

    What do you want to do with the MultiSelect list box??



    EDIT:

    Oops, just saw your post #5.

    OK, if you make multiple selection in the list box, the list box is still bound to only one control control source (one field in the record source.
    If you want to make multiple selections and save those selections, you will have to write code to loop through the selected items and write the values to a field in a table.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Combo boxes do not have a MultiSelect property.
    Not sure I would say that about all combo boxes - or am I misinterpreting?
    Click image for larger version. 

Name:	ahgrIC4M.png 
Views:	66 
Size:	14.2 KB 
ID:	45245
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I would call that a built in Sort/Filter dialog.


    A list box control has a MultiSelect property - you can see it in the control property sheet -> other tab.
    A combo box control does not have a MultiSelect property - you can not see that property in the control property sheet -> other tab.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    OK I could have used a better pic. Still its the same type of control, just added to a context menu.

    Not all properties are exposed in the sheet. Google multi select combo box - you'll get plenty of results because they do exist. They were introduced in 2007 to deal with Sharepoint lists. They can only be used with MV fields AFAIK.

    Is this better?
    Click image for larger version. 

Name:	aaG4T0q.jpg 
Views:	64 
Size:	13.7 KB 
ID:	45246

    Link with pics of mv combo
    https://support.microsoft.com/en-us/...rs=en-us&ad=us
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    OK, but I have never used Sharepoint and probably will never use it.

    And using MFV's violates the "Rules of Normalization" - I never have used MFV's and never will. Colin has an article "Multivalued Fields . . . and why you really shouldn't use them!"

    Sooo, using standard Access, not Sharepoint and not MFV;s, I still assert that a combo box control on an Access form does not have a MultiSelect property. (I wish there was a tap dancing smiley)

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You're preaching to the choir.

    OK, you win.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #12
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Oh look, another non-existant multi select combo that someone didn't post in a recent thread! There are three items selected, but I guess they aren't really. It's a mirage?

    Click image for larger version. 

Name:	mvCombo.jpg 
Views:	45 
Size:	8.4 KB 
ID:	45335

    Click image for larger version. 

Name:	mvCombo2.jpg 
Views:	46 
Size:	36.3 KB 
ID:	45336
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  13. #13
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I googled (actually I use DuckDuckGo) "Multiselect" property and Micro$oft says the multiselect property only applies to the "ListBox Object".

    I still hold that a look up field at the table level, combined with a MVF, is NOT the same as a combo box with the multiselect property.
    Both the look up field and the MVF violates the rules of normalization.


    However, I will give you that it does look like a combo box control with multiselect capability....


    We both win.....agreed??
    Attached Files Attached Files

  14. #14
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    @ssanfu, could you please drop Bill a line and see if he'll remove the documentation references to a multiselect combo box and get him to replace it with what you think is correct? You can refer to the following portions of his on-line references - thanks in advance!

    ComboBox.ItemsSelected property (Access)

    This hidden collection can be used to access data in the selected rows of a multiselect combo box control.
    Syntax expression.ItemsSelected
    ComboBox.ItemsSelected property (Access)

    You can use the ItemsSelected property to return a read-only reference to the hidden ItemsSelected collection. This hidden collection can be used to access data in the selected rows of a multiselect combo box control.
    BTW, I don't see what the multi select property has to do with this. A control is not a property. I'll give you that a combo doesn't have that property (taking your word for it) but it I'm sticking with the notion that they DO exist, albeit they have the ItemsSelected property instead of multiselect property. This would be because a listbox can be either regardless of what it's bound to. These combos have the ItemsSelected property instead, and that only applies when it's bound to a mv field.

    Over and out.
    Last edited by Micron; 05-27-2021 at 07:53 PM. Reason: added comments
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 03-20-2018, 11:30 AM
  2. Import data into multi-select combo box
    By ezybusy in forum Access
    Replies: 3
    Last Post: 12-02-2015, 11:18 AM
  3. Replies: 6
    Last Post: 05-15-2013, 03:36 PM
  4. Turn a list into a Multi select combo box
    By seth1685 in forum Programming
    Replies: 1
    Last Post: 01-11-2012, 07:52 AM
  5. Multi Select Combo box for print function
    By jparker1954 in forum Reports
    Replies: 11
    Last Post: 09-17-2011, 03:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums