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  

Previewing multiple reports



 
 
Thread Tools Display Modes
  #1  
Old January 30th, 2006, 07:44 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Previewing multiple reports

I am, through code behind a form, attempting to open multiple reports in
preview form. This is the same namedreport, but it is being passed business
unit IDs, so that it will (hopefully) preview a report for each of the
business units selected.

The code I have is:

For Each varCounter In lstSelectReport.ItemsSelected
DoCmd.OpenReport strReportNameSelected, acViewPreview, , "BusUnit =
'" & lstSelectReport.ItemData(varCounter)) & "'"
Next

It preview the first one fine, and I can watch it loop through the docmd
statement for each of the next without error -- but it won't preview them.
Interestingly enough, if I change acViewPreview to acViewNormal, it will
PRINT them all -- but not preview them all.

Is this not possible? Thanks in advance.

  #2  
Old January 31st, 2006, 03:03 PM
Bob Miller Bob Miller is offline
Senior Member
 
First recorded activity by OfficeFrustration: May 2005
Posts: 358
Default

Try putting a MsgBox that asks you to continue and a DoCmd that closes the report after that before your Next statement .
You can't open two instances of the same object in Access (Table, query, etc.)
The DoCmd.OpenReport is basically the same as double clicking the report.
Quote:
Originally Posted by KarenH
I am, through code behind a form, attempting to open multiple reports in
preview form. This is the same namedreport, but it is being passed business
unit IDs, so that it will (hopefully) preview a report for each of the
business units selected.

The code I have is:

For Each varCounter In lstSelectReport.ItemsSelected
DoCmd.OpenReport strReportNameSelected, acViewPreview, , "BusUnit =
'" & lstSelectReport.ItemData(varCounter)) & "'"
Next

It preview the first one fine, and I can watch it loop through the docmd
statement for each of the next without error -- but it won't preview them.
Interestingly enough, if I change acViewPreview to acViewNormal, it will
PRINT them all -- but not preview them all.

Is this not possible? Thanks in advance.
 




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
Printing Multiple Reports ericp General Discussion 1 January 17th, 2006 08:01 PM
I would like to email multiple reports in one e-mail lpdc General Discussion 6 January 13th, 2006 02:24 AM
REPOST: Maintaining Page Numbers with multiple reports. Robin Chapple Setting Up & Running Reports 1 August 5th, 2005 06:53 AM
Multiple reports into one. MUSIWA Setting Up & Running Reports 1 June 28th, 2005 06:34 AM
printing multiple reports kunon2 Setting Up & Running Reports 1 April 14th, 2005 12:13 AM


All times are GMT +1. The time now is 01:04 PM.


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