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!

docmd.openreport not opening

Status
Not open for further replies.

catherine17

IS-IT--Management
Jun 29, 2008
9
0
0
CA
Hi,
I have an issue with Access that I've been trying to figure out but can't seem to get fixed. On one of the forms there are two buttons, one to preview the report and the other to print the report. There are twenty people using this database and only one person has an issue with it. When he clicks the report preview button or the print button, nothing happens. He is the only one who this is happening to and I don't know why. I figure it is something with the docmd.openreport but am not sure how to fix it. There is no error that shows up, it just doesn't work. If anyone has any suggestions it would be greatly appreciated. Thanks.
 
Is a default printer installed for the computer with the problem?
 
If you have coded On Error Resume Next, any error will be ignored. In the outside chance that is your case, add a proper error handler & see what the number is. For instance, 2501 is "missing report" (I think).

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
Reports will, as far as I recall, fail silently if a printer is not installed.
 
They sure will. Also, if the report's printer is declared "specific" instead of "default", the declared printer better be there. Took a couple hours to figure that out when doing some maintenance several years ago. Yuk.

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
I think there is a printer installed because the user is printing other things off his computer. It is just this database that has the problem.
 
No, he cannot print reports for other MDB files. It turns out that he cannot open anything that pertains to printing in Access. For example, when he clicks file then page setup or printing options or print, nothing will pop up. Any ideas? Thanks.
 
Did you try dhookom's suggestion?
 
Can he print anything? Word docs?
Also have you done a compact & repair?

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
He can print other things, yes. I have not tried a compact and repair. As I said, when he tries to open anything related to printing, even setting a default printer, the screen does not show up.
 
Have the user set his default printer to a [blue]Micfosoft .. Document Writer[/blue] or similar and try create a new report. I remain 95% sure this is an issue with the user's default printer.

Duane
Hook'D on Access
MS Access MVP
 
Thanks for your post. I've tried having him view his printing settings. However, as I said before, when he goes into Access and opens up the page setup to where the printer settings are, the screen does not show up. Is there another way to set his default printer?
 
It probably isn't this simple, but there has to be a default printer declared in the printers dialog (or you can use Control Panel). Right-click the printer, click on "set as default". I swear I'm not trying to be condescending here - it might be worthwhile to take a look...

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
Win XP & later also has a "Printers & Faxes" icon in the start menu that works as well. At least mine is configured that way - might be a user-defined setting?

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
I will have him try and hopefully it works. I have a question though. If the problem lies with the default printer, how come he is able to print other things off of the printer?
 
I got him to reset his default printer and it now works. Thank you all for your help.
 
catherine17 said:
If the problem lies with the default printer, how come he is able to print other things off of the printer?
Access reports seem to be more demanding of understanding all of the capabilities of the printer such as margins, page sizes, etc.

Duane
Hook'D on Access
MS Access MVP
 
When setting his default printer to Microsoft Office Document Image Writer, what does this do? Are the reports printed off Access still printed off his regular printer? Also, how are his other programs affected?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top