Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    'Reverse' Filter (2003 All Updates)

    I have a report with Sub report. I'd like the report page to only appear if there is any associated datain the sub report
    Any help appreciated
    Steve
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Reverse' Filter (2003 All Updates)

    I'm not entirely sure what your setup is, but perhaps you could use code like this:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Cancel = Not Me.[SubReportName].Report.HasData
    End Sub

    Replace SubReportName with the name of the subreport as a control on the main report. This is not necessarily the same as the name of the subreport in the database window.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Reverse' Filter (2003 All Updates)

    Hans - thanks yet again
    Exactly where should this go - Tried the on Open on main form but got End Sub error, Tried on No data in sub form and its in a loop
    Steve
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: 'Reverse' Filter (2003 All Updates)

    Because the code Hans gave you was Private Sub Detail_Format( etc..)

    it goes in the Format event of the Detail section of the Main Report.
    Regards
    John



  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'Reverse' Filter (2003 All Updates)

    Thanks John
    ps did you get the moolah
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

Posting Permissions

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