Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    empty subreport turn off label (Access97)

    I've tried several ways to accomplish the following (none of which have worked, mind you...):

    If my subreport has no records... turn off the darn label...

    Details are as follows: main report name is rptfinal, subreport label is Label41, subreport is called tblLegDistrictAdd subreport.

    The label I need to turn off exists on the main report, it is not contained within the actual subreport...

    Any ideas??? Thanks much... Jenn.

    P.S. today is a two-thorn day... Thorn number 2 option groups... can't seem to make 'em work... EVER! <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29> and i need to use one as a filter... if you know where i can get some good info on how to use them... please point me in the direction.

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

    Re: empty subreport turn off label (Access97)

    You can use the HasData property of a subreport, something like:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me!MySubReport.Visible = Me!MySubRapport.Report.HasData
    End Sub

    As for option groups, the basic idea is that you check the value of the option group, not that of individual radio buttons within the option group. Microsoft still has a Query Samples database for Access 97 available for download here. It contains examples of using an option group to sort or filter a query.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: empty subreport turn off label (Access97)

    One solution is to use the No Data property on the subreport to make the label on the main report hidden. Another is to put the label in the subreport report header so it will not be visible if there is no data.

    As to option groups, they basically work with a set of radio buttons, and the option group takes the value of the selected radio button. What kind of problem are you having with using the value in a filter?
    Wendell

  4. #4
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: empty subreport turn off label (Access97)

    Thanks Hans & Wendell

    I went with putting the label on the report header of the subreport... but I'm certain there is a way to make it work from the subreports nodata event... it's my coding that isn't right...

    as for the option group... i'll start a new thread... thanks again everyone

Posting Permissions

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