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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report is always sorted

Status
Not open for further replies.

Rainer2000

IS-IT--Management
Apr 27, 2003
61
DE
Hi,
I have a report which I need to print out in the following way:
Print one set normal in consecutive order.
Print second set unsorted, which means two pages of page one, two pages of page 2 and so on.
My procedure looks like this:

Dim stDocName As String
stDocName = "Versand"
Set Application.Printer = Application.Printers(3) ' D1A
DoCmd.OpenReport stDocName, acNormal
DoCmd.PrintOut , , , , 1
stDocName = "Versand"
DoCmd.OpenReport stDocName, acNormal
DoCmd.PrintOut , , , , 2, False
DoCmd.Close


But all this does is printing out 3 sorted reports
Also I would like to get rid of The application.Printer statement and always force the default printer. Printer is a HP4050.

Thanks for any assistance.

Rainer
 
If your report has sorting and grouping on it then THAT is what it will always use. You can create two reports, one with sorting and grouping, and the other without.

Also, if you want to just use the default printer, all you have to do is remove your application.printer line.

-Pete
 
So what you say is, it cannot be done if my report has grouping & sorting on it. (it is the same report just being printed in a different way.).

Thanks anyway!

Rainer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top