Results 1 to 7 of 7
  1. #1
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77

    Thumbs up Need filter(s) on subforms of nav form to synch

    Hi,



    I have created a navigation form where each tab is a different subform but all based on the same table. The first tab contains a subform that is a datasheet of many of the table's fields. The second tab contains a subform that is a regular form; the users will use this form for a certain process. The third and fourth tabs are similarly subforms containing just the fields needed for particular processes. Holy heck it is pretty and the users love it.

    My problem is that when you filter any of the tabs (typically the datasheet on the first tab), the other tabs don't follow suit. They are still unfiltered.

    Example: Table has 100 records. On datasheet, user filters it for just records of certain date range. Now we're down to just the 15 applicable records. We click on any of the other tabs and they still show the 100 full set.

    How can I set the tabs to always have the same filter regardless of which tab I filter the data on?

    Many thanks!

    Kay
    in Toronto

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    How do your users filter the records? Button? Combobox?


    Sent from my iPhone using Tapatalk

  3. #3
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77
    Hi Andy49, they just use the regular filter options in the column headings on the datasheet, or on a regular form, right-click in a field and chose an appropriate filter. They need to be able to filter by any combination of fields.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    There is an OnFilter event of the form - add code to this to apply the same filter (and requery) all the other forms/subforms.

  5. #5
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77
    I think I can work with this. So you're suggesting that the event for the OnFilter event do the following...

    - save the filter being applied
    - apply that same filter to the other forms

    Thank you, aytee111. I'll try to work from there.

    Kay

  6. #6
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77
    Just returning to this after being sick for a couple of weeks. I have found the OnFilter events but I still can't find a way to save the filter and then apply it to the other forms. :-( Any help to point me in the right direction would be appreciated!

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Hope you are feeling better!

    The event is "On Apply Filter" and the filter details are in Me.Filter. So, in subform1, when the user applies a filter you would apply that filter to the other subforms.
    Code:
    Forms!mainformname!subform2name.Form.Filter = Me.Filter
    Forms!mainformname!subform2name.Form.FilterOn = True
    Forms!form2!subform2name.Requery

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

Similar Threads

  1. Replies: 2
    Last Post: 02-25-2013, 10:47 AM
  2. Table synch question...
    By MatthewGrace in forum Access
    Replies: 2
    Last Post: 01-21-2013, 12:15 AM
  3. Can you filter two subforms at the same time?
    By haggis999 in forum Forms
    Replies: 17
    Last Post: 12-30-2012, 04:06 AM
  4. Synch database after offline update
    By snoopy2003 in forum Database Design
    Replies: 0
    Last Post: 02-21-2011, 11:40 AM
  5. Continuous Subforms Filter Dependant Combo
    By BigBear in forum Forms
    Replies: 0
    Last Post: 04-19-2009, 08:13 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