473,881 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3101
ma********@yaho o.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.V isible = Forms!Form1!Mak eVisible

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
3355
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. But when i print the same report from the application developed in VB.Net the report is printed in potrait. I need to change the default setting to landscape everytime i Print the report. Do i need to pass orientation for each report in front...
16
11446
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 correctly on this site. The site is here: http://askdrray.kabis.net (temporary location) The site is being worked on, and only the front page works right now. Expect constant changes. Ignore everything “below the fold”, as the links there...
7
14386
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 display the graph but it is not possible to send query parameters to an OLE graph on a report (or programatically change any properties of an OLE Graph). However with a Form you do have the ability to change the RowSource of
2
2505
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
1524
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 either 'AM' or 'PM' and defines membership in a database. Windows XP pro and Office pro 2003 -- David CL Francis
2
2772
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
1830
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 selects the correct records each time if i then print from preview it prints the single record, but when I use this code, it prints ALL the records, I look at the print queue and its saying pages up to the amount of records where there is data, where...
2
2556
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 information to be seen as far as my form goes in print preview? Should I see an unfilled form in preview? ahhhhhhh. in advance lark
4
2960
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 take it from report view to print preview. the numbers that are on the left hand side(which are replaced with ##### due to an error i'm trying to get to the bottom of) are in the same exact format as the data on the most righthand side,...
3
4409
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
9926
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11096
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10716
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10812
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10400
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9552
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5780
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.