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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |