Print Preview vs. Printing

  • Thread starter Thread starter Randy via AccessMonster.com
  • Start date Start date
R

Randy via AccessMonster.com

I have some code which seems to work fine in print preview; however, when
the report is printed no detail records are shown. The code is run as
"Format" (i.e., Private Sub Detail_Format...). Why does the preview appear
correct with no printing?
 
Randy:

As is often the case, code that is run in the On format event may be best
run in the On Print event, so that it only fires once. Otherwise wrap your
code in the on format event like so:

If FormatCount =1 Then
Your code here
End if

That may solve your problem.
 
Back
Top