Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format and print one page at a time from a very large report 1

Status
Not open for further replies.

dwdawg

Technical User
Jun 8, 2005
2
US
I have scanned documents imported into Access. The data is in jpg format and the report is one jpg plus a few data fields (small) per page. The report can be as much as 2000 pages or more.

I want to print out one page, then format and print the next page. I have not been able figure out how to print only one page of the report.

Formatting all the pages takes way too long to print.

I do know how to step through the records, etc.

Thanks.
 
Hi
The Printout action might suit. It allows printing of pages and page ranges. [ponder]
 
Thanks, Remou. Your suggestion broke the block I was having. My solution follows:

<code>
Public Sub PrintEv()

Dim db As Database
Dim rst As Recordset
Dim j As Integer

Set db = CurrentDb
Set rst = db.OpenRecordset("qryEvidence")

'Open the report in preview mode
DoCmd.OpenReport "rptEvidencePackage", acViewPreview, , , acWindowNormal

'Step through the records printing one record at a time.
'A range of pages could be printed by adding another counter
'or modifying the "To" number
With rst
For j = 1 To .RecordCount
DoCmd.PrintOut acPages, j, j, acHigh
Next j
End With

'Clean up
DoCmd.Close
Set rst = Nothing
Set db = Nothing


End Sub
</code>

It processed a 492 page report, containing about 150MBytes of jpgs, in less than 6 minutes!:-D

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top