Results 1 to 9 of 9
  1. #1
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,387

    multiselect form


    Responding to a thread where I suggest using a multiselect listbox, I thought it would be useful to upload this simple example where you can turn a form into a multi select form. It only does a 'simple' version but with more work could probably also be extended to mimic the extended form.

    multiselectform.zip

    The principle is simple, the form requires two unbound textboxes, the first (called Select) runs some code to populate the second (SelectedList) with the uniqueID's for the selected records. Then conditional formatting is used if the uniqueID for each record is in the 'list'.

    This example has a third unbound textbox to act as a row background which is also conditionally formatted.

    The filter button has code that applies the selected list to the filter. Obviously other code to do other things such as send a report, open other forms etc could go here instead.

    I use the pipe (|) as separator since it is not used in normal spelling

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,715

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,387
    same as what?

    I also uploaded it to access world forums as well

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,715

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,387
    yes same one - I uploaded to both forums

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,715

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,387
    one and the same

  8. #8
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,702
    Nice! But of course I could not resist the temptation to play with it. I added a check for a 'no selections' condition (since I was able to mis-use the form right off the bat) and a button to clear the selections. Interesting that now I can clear selections on a filtered form, re-select a sub set and filter again. I also set form properties to eliminate the new record line on a filtered form.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,387
    glad you had fun!

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

Similar Threads

  1. Replies: 3
    Last Post: 05-21-2015, 04:57 PM
  2. Multiselect Form & Query
    By tylerpickering in forum Queries
    Replies: 4
    Last Post: 11-11-2014, 02:43 PM
  3. Replies: 8
    Last Post: 11-11-2013, 08:39 PM
  4. Replies: 1
    Last Post: 08-14-2013, 04:09 PM
  5. Multiselect to pull report from Access Form
    By Jackfam58 in forum Programming
    Replies: 3
    Last Post: 08-01-2012, 01:23 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