The Microsoft Access Jet database engine could not find the object

H

HeyOldGuy

I have a button in a database form to email the text in .rtf format but it
always gives the database engine error only on the one computer. I am
totally stumped. Here is the code from the button :
stDocName = "Print Tool Damage Sections 1-2"
DoCmd.SendObject acSendReport, stDocName

All the other computers work fine but this one. Thank you.
 
N

NKTower

My guess: Missing reference to a library. Have you checked to make certain
that all references have been resolved? To do so, go to a working computer
and open up the VBA code window for any form or module. Click TOOLS then
REFERENCES and record which items have a check present. Then do to the
machine that doesn't work and do the same. There's a good chance that you
have a missing reference. Scroll down and find the item, and click the check
box, to add it.
 
A

Arvin Meyer [MVP]

That error would indicate that on that particular computer that report is
either:

1. Missing
2. Misspelled
3. Corrupt and won't open.

Try replacing it with one of the reports that is working on another
computer. Also compact and repair the database:

Tools >>> Database Utilities >>> Compact and Repair
 
G

George Nicholson

In addition to the other excellent suggestions, make sure there is a Default
printer installed on that computer and that Access knows about it. (Can you
print *anything* else from Access on that machine, or is it just that
report?).

HTH,
 
H

HeyOldGuy

Here is the script from the button, the file is not named.
Private Sub Mail_Section_1_2_Click()
On Error GoTo Err_Mail_Section_1_2_Click

Dim stDocName As String
DoCmd.Close
stDocName = "Print Tool Damage Sections 1-2"
DoCmd.SendObject acSendReport, stDocName

Exit_Mail_Section_1_2_Click:
Exit Sub

Err_Mail_Section_1_2_Click:
MsgBox Err.Description
Resume Exit_Mail_Section_1_2_Click

End Sub
 
A

Arvin Meyer [MVP]

Generally, it's best to use a default printer with Access reports. Specific
printers, unless shared on a network with the same exact name, tend to cause
problems with Access reports if run from different machines.
 

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