Suppress printing

G

Glynn

In my report, I give the User instructions as to how to enlarge or reduce the
size of the report and how to exit the report - BUT - I do not want these
texts to appear when the report is printed.

How can I suppress these text boxes in the Footer section, when printing the
report ?

Appreciate any help
 
D

Duane Hookom

Are you allowing your users to go into the design view of the reports to make
modifications? While I don't think this is a good idea, you could set the
instructions to Visible: No. They will still show in design view.
 
F

fredg

In my report, I give the User instructions as to how to enlarge or reduce the
size of the report and how to exit the report - BUT - I do not want these
texts to appear when the report is printed.

How can I suppress these text boxes in the Footer section, when printing the
report ?

Appreciate any help

You can take advantage of the fact that the Report Activate only fires
when the report is previewed to determine if it is being printed.

Let's assume the label you wish to hide is named "lblDontShow".
Code the report's events as follows:

Comment out (or uncomment) the proper intPreview lines depending upon
whether or not you have a control on the report computing [Pages].

Option Compare Database
Option Explicit
Dim intPreview As Integer

Private Sub PageFooter_Format(Cancel As Integer, FormatCount As
Integer)
If intPreview >= 1 Then ' Pages is used
' If intPreview > -1 Then ' Pages not used
Me.[lblDontShow].Visible = False
Else
Me.[lblDontShow].Visible = True
End If
End Sub
 

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