A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

vb to determine if preview or print?



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2006, 04:25 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default vb to determine if preview or print?

Hello,

we have some code in detail_format which re-sizes a report. if it is
previewed and then printed it does not work, even though the preview is
fine. How can you tell in vb if the code is being run becuase it is a
preview or a print?

Cheers


  #2  
Old March 22nd, 2006, 12:12 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default vb to determine if preview or print?

The code runs for preview, and runs again for print. Perhaps that is the
problem, i.e. you need to use the Format event of the Report Header section
to reset your variables ready the Print-after-Preview run.

To answer your specific question, Access does not tell you whether the view
is Preview or Print, and there is no simple way to determine it. If you open
in Preview, the report's Activate event fires, whereas if you open the
report in Normal view, it does not. In practice that is not very useful,
because if the user opens in Preview and then prints from there, the fact
that Report_Activate already fired gives you no information about the fact
that it is now printing.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"a" wrote in message
...

we have some code in detail_format which re-sizes a report. if it is
previewed and then printed it does not work, even though the preview is
fine. How can you tell in vb if the code is being run becuase it is a
preview or a print?

Cheers



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get print preview and print layout to look the same? Williams Page Layout 3 September 5th, 2005 10:15 PM
Matching Print Preview to Two Page Editing Layout w. Mirror Margin MichaelM Page Layout 1 August 24th, 2005 03:33 PM
Unable to print, page setup or preview Jan Il Outlook Express 2 January 23rd, 2005 09:10 PM
How do I see print preview in color rather than grayscale? Balboa Publisher 6 January 18th, 2005 09:26 PM
Bug: print preview in form datasheet with server filter on crashes access (ADP A2002 SP3) Eric Cárdenas [MSFT] Using Forms 4 June 24th, 2004 08:38 AM


All times are GMT +1. The time now is 12:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.