Results 1 to 3 of 3
  1. #1
    LancerNZ is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2023
    Posts
    1

    Referencing chosen options from a Multiple Value Combo List

    I have a Combo Box / Value List accepting Multiple Values


    e.g. I am using "skin colour"
    The values are "pale", "midrange" and "dark"



    If someone has chosed a combination including "pale" from the list, how do I pick this up in a query / Build query process?


    e.g. If it was a single-vale field like glassesYN it would be easy:
    IIF([glassesYN]=True, "They are wearing glasses", "They are not")


    But how do I do this with a combo box of multiple values?




    IIF("pale" In ([skincolourcombo]), "They include pale skin", "They do not")
    ...this looks good to me but does not work because access needs a literal set of values in the In() part.


    How can I do this?


    P.S. I would prefer answers stick to basic query filtering as I'm not proficient with using the VB editor.

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Some reading material for you:https://support.microsoft.com/en-us/...considerations.

    Most developers don't use multivalue fields because of the difficulties associated with them, the alternative is to use a join table to keep your related values (that is what Access does with the multivalue fields but in a hidden system table).
    https://stackoverflow.com/questions/...s-in-ms-access

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I think what you need is to add .Value to the field reference in the query for a multi value field. So more like
    [glassesYN].Value

    MVF's are something that I would not even consider, given their issues.

    https://www.isladogs.co.uk/multivalu...lds/index.html
    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: 44
    Last Post: 01-18-2021, 11:12 AM
  2. Replies: 5
    Last Post: 01-31-2019, 02:09 PM
  3. Replies: 3
    Last Post: 12-14-2016, 03:14 AM
  4. Multiple sort options in single combo box?
    By rkeesecker in forum Access
    Replies: 10
    Last Post: 01-24-2016, 05:53 PM
  5. Replies: 3
    Last Post: 08-12-2014, 02:12 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