472,353 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

how to tell if ms access report is in print preview, or printing/exporting?

Hello, can someone help me.

I want to display some fields on a report in print preview (i.e.
instructions), that I don't want to print to the printer or export to
file. I can't seem to find any way of telling that the report is
displaying in print preview, vs. being actually printed or emailed/
exported.

So for example when previewing, I'd do Me![Instructions].Visible =
True.
When printing, emailing, and exporting I'd do Me!
[Instructions].Visible = False.

I tried doing some stuff with Me.Printer.Port and Me.WindowWidth but
that didn't work.
Thanks

Nov 1 '07 #1
1 2888
ma********@yahoo.com wrote:
Hello, can someone help me.

I want to display some fields on a report in print preview (i.e.
instructions), that I don't want to print to the printer or export to
file. I can't seem to find any way of telling that the report is
displaying in print preview, vs. being actually printed or emailed/
exported.

So for example when previewing, I'd do Me![Instructions].Visible =
True.
When printing, emailing, and exporting I'd do Me!
[Instructions].Visible = False.

I tried doing some stuff with Me.Printer.Port and Me.WindowWidth but
that didn't work.
Thanks
I created a report. It has the fields CustomerID and CustomerName. I
created a report. It has a field called MakeVisible. And a button to
call the report either as preview or print.

If Preview, I set the field MakeVisible to True. If print, False.

In the OnFormat event of the detail band I put the following code
Me.CustomerID.Visible = Forms!Form1!MakeVisible

I did this in A97. In newer versions theres an OpenArgs event in
Reports you could use. If printing or exporting and called from the
menu you might need your own custom menu item to set a flag.

Nov 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Devesh Aggarwal | last post by:
I developed reports in Crytsal Reports 9.0 in landscape mode. When i print the same from crystal reports it prints perfectly in Landscape even if...
16
by: Neo Geshel | last post by:
I'm helping on a web site, and it's got our knickers in a knot. We're using the same basic CSS files (with mods) and same headers as from our ...
7
by: Pat | last post by:
I would like to send the Print Preview of a MS Access form to a Snapshot file. The form contains an OLE graph. BACKGROUND A snapshot of a report...
2
by: hunt4grouse | last post by:
I want to adjust the paper size in the report module to print landscape on index cards? Any ideas are greatly appreciated....
2
by: David CL Francis | last post by:
There may be a simple answer to this but I cannot find it! I want a to print a control on a report in a different colour depending on the value...
2
by: Pkant | last post by:
I want to Print a txt file with this code : class Printing { PrintDocument prndoc = new PrintDocument(); PrintPreviewDialog ppd = new...
4
by: oldroboman | last post by:
Hi, I have a slighly annoying problem, I am using the below code to print out several reports that are linked by InspectionID field, my problem is...
2
by: Lark | last post by:
Hello and help. Im a novice to access but pretty good with word and excel, My access form will not show up in the preview mode? I checked params like...
4
n8kindt
by: n8kindt | last post by:
i have a thread posted elsewhere but it got long and messy. this is all that needs to be seen: ...
3
by: KingKen | last post by:
I would like to create an active hyperlink in my report that would allow me to open a form. Is there a way to accomplish this?
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.