Results 1 to 4 of 4
  1. #1
    DStev is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    2

    How can I cascade a Multi-selection List Box and Combo Box on my form?

    Hello,



    Newbie Access User here. I've attached two files to this message for reference. The first is a partial screenshot of my data entry form and the second is a text file with the VBA code that controls this form.

    I'm working on a form for a database that I recently set up. I don't know VBA and had a consultant help me with the setup of one of the data entry forms since there was some customization that I needed help with. It's been a couple weeks and there is one change I want to make to the form. Currently, when the users come into the App (we have a split database setup for multi-users), they have to make a selection from the list box at the top of the form to select the areas with the records that they need to update. The list box allows multiple selections. (The sub routine lstHomeDivision_AfterUpdate() controls this list box and the info in my subforms). After making selection(s), the user can navigate through the records in the set by using the command buttons at the bottom of the screen. I would like to add the functionality of also being able to select records using a combo box. There is currently a text box in my form for FTE number (highlighted in red in the attached file). I would like to change the "FTE No" text box to a combo box that only contains the FTE numbers that relate to the selections in the list box. In the file you'll see that "G&A Finance" is the current selection in the list box, and there are 19 records in this group (one record per FTE). The combo box should only have the FTE numbers for the 19 FTEs in Finance. When I've tried to add the Combo Box the dropdown contains all 560 FTE numbers from across the organization, so I've set it back to just being a text box for now. I know I need to somehow have the list box tell the combo box which records to include, but I don't know how to do this. I've attached a text file with all of the VBA code that controls this form. Any suggestions would be greatly appreciated! Thanks in advance for your help!

    DStev

    Form Screenshot.pdfForm VBA.txt

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Here are the basics:

    Baldy-Cascading Combos

    I'd guess you can use your strWhere in the row source.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DStev is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    2
    Pbaldy, Thanks very much for these examples. Problem solved!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 18
    Last Post: 07-01-2016, 02:52 PM
  2. Multi list box selection to run query
    By aellistechsupport in forum Forms
    Replies: 15
    Last Post: 11-02-2015, 09:21 PM
  3. Replies: 5
    Last Post: 04-09-2014, 06:57 PM
  4. Replies: 2
    Last Post: 06-09-2012, 07:59 AM
  5. Multi-selection from list box to reports
    By SgtSaunders69 in forum Forms
    Replies: 3
    Last Post: 03-02-2012, 09:56 AM

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