Results 1 to 5 of 5
  1. #1
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228

    Filtering a Continuous Form

    I'm looking to be able to filter my continuous form, but not by using the Filter and FilterOn properties of the form. If you open the form unfiltered and click into any of the fields, then on the Access ribbon click "Filter", you are given the full list of options to filter by, just as if you were on a table.

    Can I achieve this same result with a command button in the header of the form? Or maybe there's even another way to achieve this.



    We'll start with an example...

    Column 1 is titled "Project Number" and the command button associated with that column will be titled "cmdfilterprojnum".

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,944
    Only options I am aware of for filtering a form:

    1. right click menu

    2. ribbon: filter and filter-by-form

    3. code using Filter and FilterOn
    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
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228
    I actually was able to figure out the following way to achieve the same ribbon filter result. I just activate a specific record since clicking the command button removes focus, and then setfocus on whichever column I want to filter.

    Code:
    Private Sub cmdfilterprojdesc_Click()
    Me.Recordset.MoveFirst
    Me.txtprojdesc.SetFocus
    DoCmd.RunCommand acCmdFilterMenu
    End Sub

  4. #4
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228
    When I filter this way, it is basically the same as the right click method. What event on the form fires after I select what I am filtering?

  5. #5
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228
    Nevermind, found it.
    On Apply Filter

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

Similar Threads

  1. Replies: 2
    Last Post: 01-01-2014, 02:10 PM
  2. Continuous form not filtering
    By Ruegen in forum Forms
    Replies: 1
    Last Post: 12-18-2013, 05:49 PM
  3. Sorting/Filtering a continuous form
    By Reaper in forum Forms
    Replies: 3
    Last Post: 01-30-2013, 03:07 PM
  4. Filtering a continuous form
    By sbrookebounds in forum Forms
    Replies: 10
    Last Post: 08-14-2012, 09:56 AM
  5. Filtering a Continuous Form
    By sbrookebounds in forum Forms
    Replies: 5
    Last Post: 12-14-2010, 11:41 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