Report Prints w/o OnActivate Event Code

  • Thread starter Thread starter Rafael Fuenzalida via AccessMonster.com
  • Start date Start date
R

Rafael Fuenzalida via AccessMonster.com

I have several textboxes (On a report) who's visible property I set to False with code behind the OnActivate Event... When I print this report via the DoCmd.OpenReport method, all of the textboxes are visible (<--- not desired). When I open the report in Preview the textboxes are not visible as dictated by the code(<--- desired)... Why is the code ignored when I print the report????

Thanks in advance,
 
I have several textboxes (On a report) who's visible property I
set to False with code behind the OnActivate Event... When I
print this report via the DoCmd.OpenReport method, all of the
textboxes are visible (<--- not desired). When I open the
report in Preview the textboxes are not visible as dictated
by the code(<--- desired)... Why is the code ignored
when I print the report????

Thanks in advance,

That's because, by design, the Activate event only fires during
Preview, not Print.
Place your code in the report's Report Header Format event.
 
Back
Top