Show and not print

JPaulo

Developer
Local time
Today, 23:01
Joined
Dec 21, 2009
Messages
185
Hi all;

I want to see the data from a text box in the report, but do not want to print.

Private Sub Report_Page ()
TextBox.Visible = False
End Sub

works for first page, for the following does not work.

ms access 2003

suggestions please ?
 
You should be able to set this on the textbox properties tab...

Change display when to "screen only"
 
Hi;

which the tab in the properties of texbox, I do not see this option ?
 
Should be on the format tab...

im using 2007 atm but i believe it was on the 2003 tab also
 
thanks but still does not work for report.

Microsoft:
In many cases, certain controls are useful only in Form view. To prevent Microsoft Access from printing these controls, you can set their DisplayWhen property to Screen Only. For example, you might have a command button or instructions on a form that you don't want printed. Or you might have form header and form footer sections that you don't want displayed on screen but that you do want printed. In this case, you should set the DisplayWhen property to Print Only.

suggestions please ?
 
My apologies, I did not notice that it was referencing a form, but the same should apply for a report...

I just tested this on a report and it works for me.
(2007)

EdIT: Tried 2003.. no go will see what else i can come up with
 
Last edited:
Someone please, just what is needed to finalize...
 
I don't know how to code this out, but maybe there is a way to tag the controls using the "tag" in the properties of the control then work that into your report code.

Tag it "NoPrint" then have a conditional statement in vba that says when you print the report do not include anything with the tag "NoPrint".

I don't know if it's possible, but it's an idea.
 
Another idea, which would be bulky, but is an idea, is to build your report entirely in vba, one report for preview, one report for print,

Or possibly there is a way to build the report in vba just once and include conditional statements like: if it's for preview then show fields x,y,z else if for print hide field x.
 
Resolved;
I created a form equal to the report which put the textbox.displaywhen = 2 and works perfect. (Access 2003)

Thanks to all who helped
 

Users who are viewing this thread

Back
Top Bottom