Hiding Controls

R

Robert W

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
 
F

fredg

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
===========
 
O

observer

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
 

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