473,320 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 3054
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 the printer setting is set to potrait by default. ...
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 other sites, but the "print preview" won't work...
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 is possible. If I could I would use a report to...
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 of the control. In my case the field contains...
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 PrintPreviewDialog();
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 that this works ... to a point, if I do preview it...
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 box sizes and page layout but there is no...
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: http://i3.photobucket.com/albums/y72/n8kindt/verticalerror2-1.jpg the report looks great until i...
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.