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

Report Not Printing with OpenReport Method

Status
Not open for further replies.

garfunkel41

Technical User
Aug 20, 2003
16
0
0
I have a form in which a user enters information and then hits a command button to add a record to the form's source table. Once this record is added, two reports with the corresponding information that the user just entered, are supposed to be printed. The way I did this was in the command button procedure, I make a call to a very simple procedure that is meant to print out the reports:

Sub PrintReports()
docmd.openreport "ReportName1"
End Sub

I don't use the openreport method for the second report because the code in the first report opens (prints) the second report (the second report needs some info from the first).

Anyway, I ran the whole thing by entering information and clicking the command button, and it worked, but the second time, I only got the message box saying it was printing the first report but nothing printed. Even when I put a stop in the open procedure of the first report, it doesn't print (it's like the it's not even reaching the code for the first report). It only prints when I step through the code line by line. I haven't changed the code at all, so why is it not working?

Hopefully I'm just being really stupid, but this is extremely annoying and I would appreciate any helpful input. Thanks.

"I think there is a world market for maybe five computers." -Thomas Watson, chairman of IBM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top