how to setup event procedure on format?

  • Thread starter Thread starter Tracey
  • Start date Start date
T

Tracey

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
 
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
 
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





- Show quoted text -

It works. Thank you very much, Duane.

Have a good day,
Tracey
 
Back
Top