473,396 Members | 1,892 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.

Hitting Escape while Previewing Report

I'm totally stuck. When I click on the "Preview" button for a report
on the
database window, pressing the <ESCAPEkey simply closes the report.
But
when I use DoCmd.OpenReport with acPreview on a form, pressing the
<ESCAPEkey dumps the report into design mode.

To add one more quirk, creating a new form, and using the wizard to
create a Print Preview command button sets the report behavior back to
normal, by closing the report clean on <ESCAPE>.

Is there something on the existing form that call the Preview that
would cause this?

Aug 24 '06 #1
1 1776
So, I finally figured it out. I was launching the print preview from a
button I added to a converted printer selection form from ADH 97.
After much code review, I realized that the function which grabbed the
default printer for the report left the report open in design mode.

When it "opened" in Preview mode, it was still in design, so ESCAPING
brought it back to design.

I added a line of code to close the report, if open, when the preview
button is clicked, and then open it in acPreview and that did the
trick.

ve******@gmail.com wrote:
I'm totally stuck. When I click on the "Preview" button for a report
on the
database window, pressing the <ESCAPEkey simply closes the report.
But
when I use DoCmd.OpenReport with acPreview on a form, pressing the
<ESCAPEkey dumps the report into design mode.

To add one more quirk, creating a new form, and using the wizard to
create a Print Preview command button sets the report behavior back to
normal, by closing the report clean on <ESCAPE>.

Is there something on the existing form that call the Preview that
would cause this?
Aug 24 '06 #2

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

Similar topics

0
by: Ray | last post by:
Hi all, I would like to ask is there any method for printing the crystal report directly by choosing printer without previewing the report using CrystalReportViewer? Thanks a lot, Ray
1
by: Ray | last post by:
Hi all, Is it possible to print the crystal report directly in vb.net without previewing it? Thanks a lot, Ray
1
by: al3x | last post by:
hi, all i'm a beginner in .net, how can i preview crystal report in design time ? thx
2
by: dick3425 | last post by:
I used register the crystl32.ocx then put the active X control (Crystal Report Control) on the form name it Report1 and write the following code assigned to a button: Private Sub cmdPrint_Click()...
1
by: Mcoleman | last post by:
Hi all My problem is this, I am trying to get my report which works fine, to open at a user specified place in the total amount of records. So in other words, when the user clicks the button to...
4
by: ARC | last post by:
I have a function in the OnNoData event for all my reports. Since converting to Access 2007, some reports w/ no data will come back fine with the following code. However, it seems a few that are...
1
by: cek172 | last post by:
Currently I have a report that opens from a form and can be printed by pressing the print button on that page. I want to be able to print the report straight from the form without previewing it. Is...
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
3
by: Sheppyshep | last post by:
I am working with a hospital database and am trying to put together a report that runs statistics on the various demographics of the patients that come through. As such I have created multiple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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:
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
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...
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.