how to setup event procedure on format?

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
 
D

duanehookom

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
 
T

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





- Show quoted text -

It works. Thank you very much, Duane.

Have a good day,
Tracey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top