Hiding Controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that I would like to hide the lines and logos on (to print to
a pre-printed report) I tried the On Print Event but it tells me that the
object does not support the property or method. I tried the .Visible = False
in the On Print Expression but that hides it in regular view as well. Any
suggestions?

TIA
 
I have a report that I would like to hide the lines and logos on (to print to
a pre-printed report) I tried the On Print Event but it tells me that the
object does not support the property or method. I tried the .Visible = False
in the On Print Expression but that hides it in regular view as well. Any
suggestions?

TIA

You can use the Report's Activate event to determine if an object is
previewed, then hide the logo and lines if/when it is printed.

Option Compare Database
Option Explicit
Dim intPreview As Integer
================
Private Sub Report_Activate()
intPreview = -1 ' If [Pages] is NOT used
'intPreview = -2 ' If [Pages] is used

End Sub
================

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
If intPreview >= 0 Then ' If [Pages] not used
' If intPreview >= 1 Then ' If [Pages] used
Me!Line1.Visible = False
Me!Line2.Visible = False
Me.LogoControlName.Visible = False
End If
intPreview = intPreview + 1
End Sub
===========
 
Robert W said:
I have a report that I would like to hide the lines and logos on (to print
to
a pre-printed report) I tried the On Print Event but it tells me that the
object does not support the property or method. I tried the .Visible =
False
in the On Print Expression but that hides it in regular view as well. Any
suggestions?

TIA


Have you tried On Format?


Regards,
M Woods,
==============
www.fruitchat.co.uk
www.software-illusions.com
 
Back
Top