From: Tracey on
I have a main report and a subreport. Now it is working very well. But
we don't want everything show up on daily report.

On the main report, I put total actual time and target time. If
(totalactualtime-targettime)/targettime<0.1, then I am hoping the
subreport invisible. How can I set this up on the format at event
procedure? Please help.

Thanks,
Tracey
From: duanehookom on
You can set the subreport control to invisible with code in the On
Format event of the main report section that contains the subreport:

Me.srptControlName.Visible = Not (totalactualtime-targettime)/
targettime<0.1

This assumes the name of your subreport control is srptControlName and
TotalActualTime and TargetTime are bound to controls in this section
of the main report.

Duane Hookom
MS Access MVP

On Nov 9, 2:07 pm, Tracey <xinxindong2...(a)gmail.com> wrote:
> I have a main report and a subreport. Now it is working very well. But
> we don't want everything show up on daily report.
>
> On the main report, I put total actual time and target time. If
> (totalactualtime-targettime)/targettime<0.1, then I am hoping the
> subreport invisible. How can I set this up on the format at event
> procedure? Please help.
>
> Thanks,
> Tracey

From: Tracey on
On Nov 9, 2:04 pm, duanehookom <duanehoo...(a)gmail.com> wrote:
> You can set the subreport control to invisible with code in the On
> Format event of the main report section that contains the subreport:
>
> Me.srptControlName.Visible = Not (totalactualtime-targettime)/
> targettime<0.1
>
> This assumes the name of your subreport control is srptControlName and
> TotalActualTime and TargetTime are bound to controls in this section
> of the main report.
>
> Duane Hookom
> MS Access MVP
>
> On Nov 9, 2:07 pm, Tracey <xinxindong2...(a)gmail.com> wrote:
>
>
>
> > I have a main report and a subreport. Now it is working very well. But
> > we don't want everything show up on daily report.
>
> > On the main report, I put total actual time and target time. If
> > (totalactualtime-targettime)/targettime<0.1, then I am hoping the
> > subreport invisible. How can I set this up on the format at event
> > procedure? Please help.
>
> > Thanks,
> > Tracey- Hide quoted text -
>
> - Show quoted text -

It works. Thank you very much, Duane.

Have a good day,
Tracey