Results 1 to 4 of 4
  1. #1
    Silverhand4e is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    2

    Exclamation How to Filter a Form Based on checkmarks?


    I have a Access form with over 100K items numbers and information. I have a button that opens a subform. In the subform I have multiple checkboxes (i.e. 228, 505, 506, etc.) I want to be able to select one or more boxes then apply a filter to the main form based on those selections. i.e. Select 228 and 505 then the form filters based on the field [Sub-Section] = 228 or 505. Any Help or Suggestions?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Multiple similar fields and yes/no values indicates data is not normalized. But maybe suitable for your needs.

    Check out this tutorial http://www.datapigtechnologies.com/f...tomfilter.html

    Technique might be adaptable to Yes/No data. Not sure because requires string wildcard. Yes/No data is number. Never tried a search procedure with multiple yes/no fields.
    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
    Silverhand4e is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    2

    Extra Information

    Ok well is a more detailed example of what I am trying to do.
    I have Item Numbers and Sub-Section codes EX.
    Item Number Sub-Section Code
    1A 505
    2A 505
    3A 505
    4A 504
    5E 228
    6E 228

    This is all in a cont. form with more data but those are the main two field I am working with now. I want to open a sub for that looks similar to this:
    [] 505 - Foot
    [x] 504 - Ankle
    [x] 228 - Bio

    I check marked 504 and 228 so then when I click accept I want it to reopen or add filter or re query my main cont. form so that on 4A, 5E, and 6E are displayed. And with this the ability to select any combination on 505,504,228 to filter by on the form.

    Hope this gives a better explanation of what I am trying to accomplish

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Oh, so really one field with these values. How many possible values? This article shows using a multi-select listbox to compile filter criteria for a report. http://allenbrowne.com/ser-50.html The compiled filter could be applied to the form instead. Using an unbound checkbox to select records is either not possible or takes some VBA magic I don't know. It is because every instance of unbound control in Continuous or Datasheet view reflects the choice made in any one instance as there really is only one control.

    Alternatively, add a Yes/No field to the table, bind control to the field. Use the field as criteria to filter form records.
    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.

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

Similar Threads

  1. Subform Filter based on Main Form Information
    By james.carpenter2 in forum Forms
    Replies: 0
    Last Post: 02-16-2011, 09:55 PM
  2. Replies: 1
    Last Post: 11-16-2010, 08:42 AM
  3. Replies: 1
    Last Post: 02-03-2010, 08:17 AM
  4. filter form based on combo box
    By lloyddobler in forum Forms
    Replies: 8
    Last Post: 09-10-2009, 07:33 AM
  5. Form Based Query/Filter
    By Micon in forum Access
    Replies: 0
    Last Post: 11-07-2008, 09:25 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