filter by form ADP problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sara4
    New Member
    • Dec 2007
    • 9

    filter by form ADP problems

    I have a form with 2 subforms on it.

    The 2 subforms have a table-valued function as their recordsource and the input parameters property that 'reads' the parameter values (field values) from the main form.

    It all works fine when I open the form...records in my subforms are ok.

    If I apply the Filter By Form Access functionality on the main form and filter by a field that is used as a parameter for my subforms, the main form gets filtered correctly but the subforms remain as they were after the opening of the form. As if the subforms don't get the info that I filtered the main form. As if there's no automatism...th e problem is that I don't know how to make this work.

    Any ideas?
  • PianoMan64
    Recognized Expert Contributor
    • Jan 2008
    • 374

    #2
    then you need to requery the subforms in order to update them with the current filter applied to the main form.

    me.ControlName. requery

    Comment

    • sara4
      New Member
      • Dec 2007
      • 9

      #3
      I wish it was that easy...I'm trying to go with requery in applyfilter event but no change.

      Comment

      • Jim Doherty
        Recognized Expert Contributor
        • Aug 2007
        • 897

        #4
        Originally posted by sara4
        I wish it was that easy...I'm trying to go with requery in applyfilter event but no change.
        Have a look at your 'serverfilter' property for the form Sara and alter that to suit your requirements for the dataset supplied to the subform. Its difficult to supply an example for you, given I don;t strictly know the layout of what you have there... but 'serverfilter' is the direction you need to go

        Jim :)

        Comment

        Working...