473,387 Members | 1,582 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,387 software developers and data experts.

OnPrint Event-2

NeoPA,

Thanks for getting back with me.

Your understanding of my issue is correct. I wish to trigger some code (the printing of a separate report) when one report is sent to the printer and not to the screen.

I have code in the "PageHeaderSection" of my main report to perform this function. The code works fine but I only need it to execute one time and that is when the user sends the report to the printer.

Is there any way for Access to detect whether the Print dialog box is open?

Thanks again,

BigJohnT
Oct 12 '09 #1
4 2221
NeoPa
32,556 Expert Mod 16PB
John,

May I ask why you've posted this as a separate thread?

At the very least it needs a link to the other one otherwise it will be very difficult to work on. Were you getting 503 errors by any chance? Service unavailable?
Oct 12 '09 #2
NeoPa,

I apologize for the additional level of details. I had problems communicating with the server. I could NOT post a reply to your orginal response.

Below please find my orginal posting with your response. I am not recieving any error messages. My problem is that the second report is printing each time a page is printed to the screen.

===== ORGINAL POSTING ========

Hello Bytes:

I have a MS Access report question.

BACKGROUND:
I have successfully created a report index to be used with my main report. I want this report index to print only if the user decides to manually print the main report (ie. File -> Print).

PROBLEM:
As you know, the OnPrint event executes each time a page is initially displayed on screen. In this case, I do not wish to print the report index.

QUESTION:
Is there a way to evaluate whether the Print Dialog is displayed on screen? If so, can I use it to instruct Access to print my report index?

JUST A THOUGHT:
After the user navigates the report on screen, the onPrint event will no longer fire for those pages displayed. The On Print event will only execute if the User manually prints the report. Can I use this behavior to control the OnPrint event?

Thanks,

BigJohnT

===== YOUR RESPONSE ========

If I understand you correctly John you are wanting to trigger some code (the opening/printing of a separate report) when one report is sent to the printer (The term print here is misleading as Access refers to sending something to the screen as a print - in PrintPreview mode). Is that right?

You should understand that the OnPrint event is only associated with report sections. Not reports or even the printing (sending to printer) of them.

Welcome to Bytes!

====== MY RESPONSE ============

NeoPA,

Thanks for getting back with me.

Your understanding of my issue is correct. I wish to trigger some code (the printing of a separate report) when one report is sent to the printer and not to the screen.

I have code in the "PageHeaderSection" of my main report to perform this function. The code works fine but I only need it to execute one time and that is when the user sends the report to the printer.

Is there any way for Access to detect whether the Print dialog box is open?

Thanks again,

BigJohnT
Oct 13 '09 #3
NeoPa
32,556 Expert Mod 16PB
I believe there were some general issues with the service (which seem to be sorted now thankfully). When I get a second I'll tidy this up and lock this one down. We can continue on properly in the original thread.
Oct 13 '09 #4
NeoPa
32,556 Expert Mod 16PB
For any interested parties this discussion continues where it originated, at OnPrint Event.
Oct 13 '09 #5

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

Similar topics

0
by: Andy Read | last post by:
Hello all, I have the requirement to produce source code that produces an object hierarchy. Example: Root | Folder 1
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
0
by: Liz McCausland | last post by:
I am trying to use the OnFormat and OnPrint functions to produce 2 copies of a report with different headers and some controls not visible on one of the copies. I have done this in Access 2 but...
13
by: Charles Law | last post by:
Mr "yEaH rIgHt" posted the following link about a week ago in answer to my question about removing event handlers. > http://www.vbinfozine.com/t_bindevt.shtml Following on from that post, the...
12
by: Jack Russell | last post by:
My unstanding of all VB up to and including vb6 is that an event could not "interrupt" itself. For instance if you had a timer event containing a msgbox then you would only get one message. ...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
9
by: jeff | last post by:
New VB user...developer... Situation...simplified... - I want to wrap a pre and post event around a system generated where the pre-event will always execute before the system event and the...
4
by: BigJohnT | last post by:
Hello Bytes: I have a MS Access report question. BACKGROUND: I have successfully created a report index to be used with my main report. I want this report index to print only if the user...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.