Results 1 to 6 of 6
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    What should this be set to and what function does it serve?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    In general, I don't think you want to use it - if you set it to Yes (True), it will apply whatever the filter is that is stored in the Filter On property. In some applications it may make sense, but not the way we do things. It was added in 2007.
    Wendell

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    Thanks Wendell, the reason i ask and have found my answer already is, if i set it to No i find that the records in the subform dont show after i set the FilterOn preperty to limit the main form to a selected record.
    As soon as i set this property to Yes, it shows the records in the subform.

    Seems weird to me.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    That seems weird to me too - I would expect it to not show any records if you have it set to Yes. Subforms do an automatic filter using the link properties to the main form, and unless your filter value was set to something that allowed the subform filter to see records, I would expect it to be empty. I just checked a database where there are some 70 subforms, and that property is set to No in all of them. Now if you are trying to further filter records in a subform, then you must apply the filter. But that requires setting the FilterOn property, not the FilterOnLoad property. See Filter: Limit the number of records in a view for some further discussion on the FilterOnLoad property and how to use it.
    Wendell

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    Just to keep you up to date on this, i found that the subreport's FilterOnLoad was set incorrectly, i ended up setting both the main Report and the subreport FilterOnLoad to No in both cases and all is well.
    So it wasn't so weird after all.

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I had a situation recently where I did need to set the Filter on Load property of a subreport to Yes.

    I had a report that was normally opened in one context, but was then asked to open it from another context with a filter on the subreports.
    I assumed that 'normal' code to filter the subreports would work, but it kept throwing errors. Investigations led me to the conclusion that you cannot dynamically filter a subreport as you open it.

    The only solution I could find was to open the subreports in Design View (via code) , set the filter, save, close, then reopen the main report. In 2003 this worked, but it only worked in 2007 when the subreports' "Filter on Load" properties were set to "yes". Doing that had no impact on behaviour under 2003.
    Regards
    John



Posting Permissions

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