From: TonyWilliams via AccessMonster.com on
I have a report (rptlinesbycountry) that is run twice a year in June and in
December which includes a date control txtmonth (I realise the txt prefix is
a little misleading but the field is definately a date field). The report
contains a sub report (rptlinesbycountryYTD) that I only want to be shown
when the report is run in Decemeber. How do I code the report for that to
happen?
Thanks
Tony

--
Why don't my grey cells communicate with each as fast as they used to? I hate
getting old!

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/201002/1

From: Marshall Barton on
TonyWilliams via AccessMonster.com wrote:

>I have a report (rptlinesbycountry) that is run twice a year in June and in
>December which includes a date control txtmonth (I realise the txt prefix is
>a little misleading but the field is definately a date field). The report
>contains a sub report (rptlinesbycountryYTD) that I only want to be shown
>when the report is run in Decemeber. How do I code the report for that to
>happen?


Use the Format event of the section containing the
subreport:

Me.subreportcontrol.Visible = (Month(Date) = 12)

Make sure the subreport control and its section both have
their CanShrink property set to Yes.

--
Marsh
MVP [MS Access]
From: TonyWilliams via AccessMonster.com on
Thanks Marshall that worked just fine.
Tony

Marshall Barton wrote:
>>I have a report (rptlinesbycountry) that is run twice a year in June and in
>>December which includes a date control txtmonth (I realise the txt prefix is
>>a little misleading but the field is definately a date field). The report
>>contains a sub report (rptlinesbycountryYTD) that I only want to be shown
>>when the report is run in Decemeber. How do I code the report for that to
>>happen?
>
>Use the Format event of the section containing the
>subreport:
>
> Me.subreportcontrol.Visible = (Month(Date) = 12)
>
>Make sure the subreport control and its section both have
>their CanShrink property set to Yes.
>

--
Why don't my grey cells communicate with each as fast as they used to? I hate
getting old!

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/201002/1