Problem retrieving printer info?

D

Dennis

We recently converted some databases from Access 97 to 2002. Now the
converted databases display the following message when any report is
attempted:

There was a problem retrieving printer information for this object. The
object may have been sent to a printer that is unavailable.

Can someone please shed some light on this issue? Thanks!
 
A

Allen Browne

You should be able to avoid this by opening each report in design view, and
setting it for the default printer instead of for a particular printer.

Firstly make sure you have unchecked the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://members.iinet.net.au/~allenbrowne/bug-03.html
Then compact the database:
Tools | Database Utilities | Compact

Now open the first report in design view.
Choose Page Setup from the File menu.
On the Page setup, set the Printer as 'Default Printer'.
Close the dialog. Save.
Repeat for other reports.

Then compact the database again.
 
D

Dennis

I am unable to open the reports in question, because the original printer
isn't mapped to the PC at this time, and I have no idea what it was. I just
get the error message when I try to open the report, even in design view.

Any ideas?

Thanks!
 
A

Allen Browne

Hmm. You should be able to open the report in design view without having a
driver the original printer (whatever it was). The only requirement is that
you have *some* printer installed, because Access uses the printer driver to
calculate the metrics for the report. It can be anything at all, and does
not need to be actually connected to the computer.

Open the Immediate Window (Ctrl+G), and enter:
? Application.Printers.Count
That should give you the number of printers you have installed. Try:
? Application.Printer.DeviceName
That should give you the name of the default printer.
Sensible results?

You did ensure Name AutoCorrect is off?

Next trick might be to try exporting the report to a text file, deleting,
and importing it again.
1. Make a backup of your mdb file, while it is not in use.
2. In the Immediate window, enter:
SaveAsText acReport, "Report1", "c:\report1.txt"
3. Delete the report.
4. Compact the database.
5. In the Immediate window, enter:
LoadFromText acReport, "Report1", "c:\report1.txt"
Works?
 
D

Dennis

They do have one printer installed (and set as default). I attempted to
delete/re-add that printer yesterday, with no result. I'll try thew
export/import route and see what happens.

Thanks. I'll let you know...
 
D

Dennis

Export to TXT worked fine. On attempting to import back in, got:

Error 2052 - not enough memory to update display

This was with only WinExp and Access running. The immediate display of
printer information worked perfectly. Correct default printer and number of
printers. I am at a loss, and this issue MUST be resolved today.

Thanks for all your effort on my behalf.

Dennis
 
A

Allen Browne

If it did not import again, there may be a corruption in the database.

Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

Then compact:
Tools | Database Utilities | Compact.

Then follow the 6 steps for the first symptom in this article to get Access
to rebuild the file for you:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top