Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003

    Unanswered: Filtering Subforms

    I have a question. I have a main form that will set my filtering value. I have a popup form that contains 2 sub forms.

    How do I filter the subforms from the popup form? When I use the docmd.applyfilter , "FilterId = " & id, Access keeps complaining about not having the subforms open.

    Any ideas would be great. Thanks!

  2. #2
    Join Date
    Jan 2003
    where do you put the command "docmd.applyfilter"?

  3. #3
    Join Date
    Oct 2002
    Leicester - UK
    if the subform is linked to the parent form then filters should automaticly apply unless you want the sub form filtered by a different filter, if thats the case i think i know how to do it
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  4. #4
    Join Date
    May 2003
    Provided Answers: 5
    When you say "filter the subforms from the popup form" you mean apply the criteria from the main form to the popups?

    Different ways to do that I usually apply my recordsource based on the criteria of the applicable data of the current record on the main form and requery the subforms based on the ONcurrent event of the Mainform - no filtering really from the Main form just requery the secondary forms as you move through the recordset of the main form

    caveat - you will have to use the isloaded function behind the main form' OnCurrent event to check and see if the popups are loaded and if not do nothing:

    If isloaded ("forms!PopUpformname") then
    End if

    You can get that function from the Northwind database if you are using pre-2000 access or I believe it is built into 2000 and XP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts