Re: subreport and null value problem
From: Marshall Barton (marshbarton_at_wowway.com)
Date: 04/28/04
- Next message: Marshall Barton: "Re: Criteria formatting"
- Previous message: Lee Schipper: "Re: Criteria formatting"
- In reply to: tony: "Re: subreport and null value problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Apr 2004 13:36:10 -0500
tony wrote:
>I tried your suggestion below, but am a little confused
>about the label control. When I go to the properties
>dialog box for the label, there are no places to enter
>events or control source. Where should I place the code
>
>Me.thelabel.Visible = Not Me.subreport.Report.HasData
>
>and/or how do I attach that code to the label?
Sorry, I should have said that the code needs to be in the
Format event of the **section** containing the subreport.
The code is not "attached" to the label, it just operates on
the label.
-- Marsh MVP [MS Access] >>-----Original Message----- >>Tony wrote: >> >>>I am having the problem: I have a "Count(*)" function >in >>>the footer of a report, and within the function I've >>>included the "Nz[field],0" operator to show the 0 when >no >>>records are present. When the report is viewed stand- >>>alone, it prints out fine. However, when it is included >>>as a subreport in another main report, it disappears >when >>>the value is 0. How can I get that subreport to show up >>>even if the value is 0? >> >> >Marshall BArton wrote >>A subreport with no records does not have any values, not >>even Null. You can, however test if the subreport has >data >>or not and use that to make a control on the main report >>visible of not. For example, if you have a label control >>with the caption 0 on the main report in the same place as >>the subreport control, then you can use a line of code: >> >> Me.thelabel.Visible = Not >Me.subreport.Report.HasData >> >>to display the zero when there is nothing in the >subreport.
- Next message: Marshall Barton: "Re: Criteria formatting"
- Previous message: Lee Schipper: "Re: Criteria formatting"
- In reply to: tony: "Re: subreport and null value problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|