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!

"Cannot Open Any More Databases" on Report Print

Status
Not open for further replies.

miken51

Technical User
Jul 31, 2007
2
US
I have a report which contains 3 subreports (with one other subreport in one of each of the subreports). The report displays on the screen, but when I try to print it, I get "Cannot Open Any More Databases". If I click on ok to clear it, it will come back a few times, then print only the parts of the report that are not in the subreports. Since I have only opened one database, there are no databases (that I know of) to close. Is there a work around for this?
Mike
 
Are you using any code, combo or list boxes, domain aggregate functions, or similar in your reports?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I found the answer. This is really "too many tables open." When a report is opened, it runs the queries to generate the preview window. When you hit "print", it runs all the queries AGAIN, pushing the number of temporary tables over the top. The answer is to do a custom form with a print button. I display the form when the report is opened. When the button is pressed, the I close the report preview, then execute a doCmd.OpenReport. This opens the report directly to the printer. When it returns from that, I reopen the report in preview mode.
Ain't pretty, but it works!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top