View Full Version : opens report in design view...


JCross
12-10-2002, 12:01 AM
Hi! I havea button to print out a report...

Reports!rptSalesMix.OrderBy = "[PLUNumber] ASC"
DoCmd.OpenReport stDocName, acNormal

and when you click it it opens the report in design view before printing it. How can I stop it frlom doing this?

Thank you!

Jennifer

Wicklund
12-12-2002, 05:01 AM
I have something similar, this is the code that I have for the command button, and I have never had the report open in design view.

Dim stDocName As String

stDocName = "Report1"
DoCmd.OpenReport stDocName, acNormal

Good Luck

Pat Hartman
12-12-2002, 08:07 PM
Remove the code that is setting the order by and move it to the Open event of the report.