Results 1 to 5 of 5
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276

    Select Multiple Items In The List To Show Detail In The SubForm


    have a form "AcTitlNPurDteDetailFrm" on this form there are two combo boxes for "Account Title" (CboPPP) and "Item Discription" (SchDescripCbo) when they are selected I get the detail on "AcTitlPurDetailSubFrm"
    This is working perfectly. Whereas I actually want to use combo boxes "Account Title" (CboPPP) and "Select one or more Items" (DiscripCbo) to select multiple items in the list and
    Detail to show on "AcTitlPurDetailSubFrm". I need help to perform this task.


    A sample Db is attached to better understanding.

    Sample DB.zip

  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,929
    A multi-select combobox must be bound to multi-value field.

    Controls used to enter/select filter criteria must normally be UNBOUND (as you have in your form).

    DiscripCbo is actually a listbox. Might change name to DiscripLbo.
    For using an UNBOUND multi-select listbox to build filter criteria, review http://allenbrowne.com/ser-50.html

    If you really want to use multi-select combobox, this would require saving selections to a multi-value field then VBA managing a recordset to expand MVF to retrieve data elements and build criteria.
    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
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    You really don't need the second combobox. The multiple selections can be made from the listbox.
    Your design is complicated by the form/subform having no linking relationships, so the subform recordsource has to be controlled by code on the main form as selections are made.

    Sample-davegri-v01.zip
    Last edited by davegri; 04-24-2023 at 11:21 AM. Reason: inc attachment

  4. #4
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    Thank U. I will reverse engineer the sample you attached to understand how you fixed it.

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Thank U. I will reverse engineer the sample you attached to understand how you fixed it.
    OK. If you get stuck and need some detail help, PM me.

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

Similar Threads

  1. Selecting items in multi-select list box
    By chronister in forum Access
    Replies: 3
    Last Post: 08-25-2013, 03:33 AM
  2. Replies: 7
    Last Post: 06-20-2013, 12:09 PM
  3. Select multiple items from list box
    By sharmaprashant22 in forum Queries
    Replies: 2
    Last Post: 05-05-2011, 12:18 PM
  4. Multiple detail items per line
    By needafix in forum Reports
    Replies: 3
    Last Post: 10-22-2009, 11:04 AM
  5. Replies: 1
    Last Post: 03-01-2009, 09:53 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