Results 1 to 6 of 6
  1. #1
    TMac is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    3

    Multi-valued list

    Hello all-

    I would like to build a form that allows a user to select multiple values from a combo/list box to add to a field in a table. The intent is to create a list of birds that would allow someone to select only the birds in view at a regular interval (e.g., hourly). The options below are where I stand at the moment. I've explored Options 1 and 2, but they have issues...Option 3 is something that I'd like to explore, but need help with:
    -Option 1) I've enabled the Combo Box functionality in the field in the _table_, and can select and add multiple values as needed from the form via checkboxes. However, because this form will be used on a 8" tablet in the field (on construction sites), large buttons/fields will be a must. Not being able to enlarge the actual checkbox for the Combo box will make it hard to select the correct value with fingers.
    -Option 2) As a test, I also set up a List box (which I can then enlarge the text as needed to make it easier to see/tap) that is supposed to feed into another (test) field, but the values selected in the List Box won't populate the field in the table when I move to a new record. So, from a formatting/GUI perspective this option is better, but the data does not appear in the appropriate field in the background table.
    -Option 3) Have the user select multiple values in the List box, then add the values to another field on the same form (ie using a "right arrow" to move the values to the new field), which would then populate the proper field in the table with a click of a button. However, this gets a bit outside of my query building box, and I have not been able to execute this option.



    I don't know SQL very well, so if this is the only option, then I will need baby steps. Does anyone have any suggestions? Thanks in advance.

    Todd

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    dont use multi value, it takes programming,
    instead use a single list, upon dbl-click, runs an append query to add items to a 'Picked' table.
    this table is joined to the data table to pull only the birds chosen. you dont need sql, just a few queries
    NO code needed.
    1 query to add to tPicked,
    1 query to remove item(s)
    1 final query to pull the data chosen

    if you use checkboxes, again, you need programming to make changes if items are added to the list.
    Click image for larger version. 

Name:	pick state-lbl.png 
Views:	31 
Size:	34.2 KB 
ID:	35577

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Combo boxes only allow one selection to be chosen.
    Either use a simple listbox as in option 3 or a multiselect listbox as in option 2.

    Option 2 will require code but there are many examples online you can adapt. For example http://allenbrowne.com/ser-50.html.
    Don't be put off by use of VBA. It's not that hard
    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

  4. #4
    TMac is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    3
    Quote Originally Posted by ranman256 View Post
    dont use multi value, it takes programming,
    instead use a single list, upon dbl-click, runs an append query to add items to a 'Picked' table.
    this table is joined to the data table to pull only the birds chosen. you dont need sql, just a few queries
    NO code needed.
    1 query to add to tPicked,
    1 query to remove item(s)
    1 final query to pull the data chosen

    if you use checkboxes, again, you need programming to make changes if items are added to the list.
    Click image for larger version. 

Name:	pick state-lbl.png 
Views:	31 
Size:	34.2 KB 
ID:	35577

    Thanks. So I need to add multiple values (ie from the tPicked table in your example) to another table ("BirdData"), all in a single field ("BirdCodes"). So if I have four codes chosen from the Listbox on the left (in your figure), I need to add them to the "BirdCodes" field as "MALL, CALT, SLEC, DERC". I have to summarize the data in a weekly report that presents the data like this. That's why the multi-value List Box is desirable...because the data output is what I need. It's just that the check boxes are so small that it makes it hard to use a finger on a tablet. A stylus is an option, but the tablet will be in the sun, so tapping the small checkbox will still be hard. In your example, can you condense the chosen values into single line in a single field? Thanks again.

    Todd

  5. #5
    TMac is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    3
    Quote Originally Posted by ridders52 View Post
    Combo boxes only allow one selection to be chosen.
    Either use a simple listbox as in option 3 or a multiselect listbox as in option 2.

    Option 2 will require code but there are many examples online you can adapt. For example http://allenbrowne.com/ser-50.html.
    Don't be put off by use of VBA. It's not that hard

    Thanks. So I've got the multi-value list boxes set up exactly how I need, but the issue is the tapping on the small checkboxes with fingers on a tablet in the sun. The combo box with the multi-select property set to "simple" allows me to select multiple values from a list, but I can't figure out how to take the selected values and translate them to a single field (e.g., I'd like to be able to choose four values [MALL/CALT/DCER/SECR], and add them to a single field as "MALL, CALT, DCER, SECR"). I'm not using the selected values in a query or report, but as birds observed every hour. So, the data has to be moved to a single line. Thanks again. Any thoughts are appreciated

    Todd

  6. #6
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Here's a few listbox examples.
    See if the function getLBX will do what you want.

    edit:
    So, the data has to be moved to a single line.
    Rarely a good idea, IMO.
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 2
    Last Post: 07-20-2018, 01:30 PM
  2. Replies: 4
    Last Post: 06-12-2018, 06:22 AM
  3. Replies: 2
    Last Post: 02-19-2013, 04:02 PM
  4. Multi Valued field sort
    By bugman61 in forum Reports
    Replies: 2
    Last Post: 08-06-2011, 11:45 AM
  5. querying Multi-valued fields
    By switters in forum Queries
    Replies: 1
    Last Post: 04-21-2011, 10:59 AM

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