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

Ctrl+P prints the Form not Report being Previewed

446 Expert 256MB
Hi,
I have a Sales Order form from where I can print either a Sales Order Acknowlegement, a Delivery Note or an Invoice.
When printing the Delivery Note (DN)the user wants to manually select either a dot matrix printer with multipart stationery, or a laser printer in which case she enters that she wants 3 copies.
To do this she has been able to open the DN in Preview mode then used Ctrl+P to open the print dialogue box to make the selection.
Since I have changed the underlying Form to be Unbound, we find that the Form prints-out rather than the Report we are viewing.
I'm using Access 2010 front with SQL-S 2008R2 backend.
Also using DoCmd.Maximize in Resize event of DN Report to attempt to maintain focus on the report.
The Bound version of the form still prints the DN as expected but the Unbound version still seems to retain focus and print itself.

Anybody any ideas what I am missing??
Many thanks in advance.
S7
Oct 31 '11 #1
2 2325
sierra7
446 Expert 256MB
An update on this post:
It seems it is a matter of 'which document has focus?'
The previewed report must be given focus by clicking on it(even when it is maximised full screen) for Ctrl+P to print it rather than the underlying form.
Have not resolved why this is necessary when the underlying form is Unbound and not when it is Bound.
Have now avoided the problem by calling an InputBox to allow the user to enter number of copies, so avoiding Ctrl+P .
S7
Nov 4 '11 #2
jimatqsi
1,271 Expert 1GB
Very interesting situation. So the ctrl-P is just doing what it does, it's the focus that is misbehaving. I suppose you could also bind the report to some meaningless one-row recordset to overcome what is apparently a bug or "undocumented feature", lol.

Jim
Nov 4 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: CSDunn | last post by:
Hello, I have ‘Snap to Grid' turned off when I am working in the Design View of either a form or report. However, it only seems to be off when I use the mouse. If I try to move controls with...
0
by: Filipe Martins | last post by:
Hello to all. Ever had a problem when your print some reports in a printer other the one you use more frequently, in which the report width span more tban one page? I did, and didn't liked it. ...
3
by: terragrub | last post by:
I found some code that works great to creat empty rows of boxes on a report from the end of the data to the bottom of the report. Now, I can't seem to find the original message to post a question...
5
by: nick_faye | last post by:
Hi, I am still a newbie to VB and using MS Access 2000. I am currently trying to provide a preview of reports before printing them. My program is simple: AC.DoCmd.OpenReport "MyReport",...
8
by: Jon Weston | last post by:
I'm setting up an Access2003 database with pictures. I put a bound ole picture ctrl on a form that's source is the table that contains the pictures and follow ALL the directions for embedding a...
13
by: deko | last post by:
I have a basic feedback form with a submit button. After the "send" button is clicked, I want the user to be redirected to a different page that says "Your message has been sent." How do I do...
3
by: pramodrepaka | last post by:
I am using adodb with the help of oracle while printing the data report prints multiple rows but I want a selected row to be printed in the data report. Please help me if any one One more question...
1
by: sergioabreu | last post by:
I saw a post about this issue, but it seemed to be closed. I needed a code that allowed to handle click + ctrl in a form object such as a textfield. In order to work also on IE, I wrote the...
6
by: prakashwadhwani | last post by:
While making Vouchers in a form, I have a POST button which validates & posts the transaction to the main Accounts File. I also have a PRINT button which provides the user with a preview of the...
2
by: Ian Anderson | last post by:
Hello there, SO i have the followign VB code in my continuous form... 'Purpose: This module illustrates how to create a search form, _ where the user can enter as many or few...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
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...
0
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...

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.