Results 1 to 4 of 4
  1. #1
    ezz is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2014
    Location
    Over the Hills and Far Away
    Posts
    16

    Multivalued combo box

    Hi,

    I've been struggling with this for a long time now.

    I have a field in a table that I want it to be multivalued. The values are stored in a different table. I tried to do that and it worked fine. But when I wanted to display a pie chart in a report based on a query, the values didn't show up.



    Example:

    EmployeeName: X
    TermenationReasons: 1,2,3 (multivalued field - values stored in a different table)


    I though of just changing the field type to a text, and create a combo box in the form that allows me to add multiple values, and appear on the table and the query, and the pie chart too.

    I don't know how to make a multivalued combo box in a form. Am I doing something wrong? Is there an easier way to do that?

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    Yes, the easiest way is NOT to do multi select box.
    instead, 2 lists, 1 is the list of items available.
    2 is the list of the picked items.
    when the user dbl-clicks list 1, execute an append qry to the picked table. Then refresh the 2nd list.

    Code:
    lst1_dblClick()
    docmd.hourglass ffalse 
    docmd.openquery "qaAddPickedItem"
    lst2.requery

  3. #3
    ezz is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2014
    Location
    Over the Hills and Far Away
    Posts
    16
    Quote Originally Posted by ranman256 View Post
    Yes, the easiest way is NOT to do multi select box.
    instead, 2 lists, 1 is the list of items available.
    2 is the list of the picked items.
    when the user dbl-clicks list 1, execute an append qry to the picked table. Then refresh the 2nd list.

    Code:
    lst1_dblClick()
    docmd.hourglass ffalse 
    docmd.openquery "qaAddPickedItem"
    lst2.requery
    Thank you, ranman256. I'll give it a try.

    But will I be able to create a pie chart in a report that displays the percentage of how many times a certain value was chosen?

  4. #4
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    You can make the chart from the PICKED list, tho Im not sure exactly what you need.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-04-2015, 03:12 PM
  2. Replies: 2
    Last Post: 02-02-2015, 03:23 AM
  3. Replies: 6
    Last Post: 07-03-2014, 02:32 PM
  4. Use or not Use Multivalued Lookups
    By bradjake8 in forum Access
    Replies: 1
    Last Post: 08-05-2013, 05:05 PM
  5. Multivalued fields
    By ydt in forum Forms
    Replies: 1
    Last Post: 08-25-2010, 01:52 PM

Tags for this Thread

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