• empty subreport turn off label (Access97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » empty subreport turn off label (Access97)

    Author
    Topic
    #377504

    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! scratch 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.

    Viewing 1 reply thread
    Author
    Replies
    • #621891

      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.

      • #621904

        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

    • #621890

      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?

    Viewing 1 reply thread
    Reply To: empty subreport turn off label (Access97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: