×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Error 2766

Error 2766

Error 2766

(OP)
My database has a feature that allows for emails to be automatically sent out from a couple of different forms.
I thought I had all the bugs worked out but now I'm receiving the following error(s) when I click the 'Send Email' cmd button:


2766: The object doesn't contain the Automation object 'none.' in Module: Form_frmDocument, Proc: cmdSend_Click



Run time error '2766':
The object doesn't contating the Automation object 'none.'



I checked the MS Knowledge Base and did a Tek-Tips search for error 2766 but found nothing. Can anyone help me understand what it's looking for with the object 'none'?

Thank you,
KerryL

RE: Error 2766

(OP)
Thanks mp9. Here's the code behind the cmd button. Note that it calls a separate procedure (SendToContact801) which I also included after the cmd button code. It's pretty basic cmdSendObject code.

============
BEGIN CODE 1
============

Private Sub cmdSend_Click()
    ' Comments  :
    '   Case 1: From Initiator: send to Contact
    '   Case 2: From Contact
    '           Send e-mail to all listed under document
    '           message sent depends on FYI/RFI field
    ' Parameters:
    ' Created   : 10/12/2000 12:19 PM TRC
    ' Modified  :
    '
    ' --------------------------------------------------
    
    On Error GoTo PROC_ERR
    
    Dim dbs As Database
    Dim qryEmail As QueryDef
    Dim rstEmail As DAO.Recordset
    Dim GenlInfo As GenlInfo
    Dim intHeaderID As Integer
    GenlInfo = ggiGenlInfo

    'Be sure global information if populated
        If GenlInfo.ContactEmail = "" Then
            Call GetGenlInfo
            GenlInfo = ggiGenlInfo
        End If
    
    'Send email notification to Contact
    Call Send2Contact801
    
    'Update date fields
    Me.txtEmailToContact = Date
    MsgBox "Notice sent to: " & GenlInfo.Contact, , "Email Sent"
    DoCmd.GoToControl "cmdClose"
    Me.cmdSend.Visible = False


PROC_EXIT:
    Exit Sub
    
PROC_ERR:
    If Err.Number = 2501 Then   'user cancelled sendobject
        Resume Next
    End If
    MsgBox Err.Number & ": " & Err.Description & vbCrLf & "in Module: Form_frmDocument, Proc: cmdSend_Click"
    Resume PROC_EXIT
    
End Sub

==========
END CODE 1
==========



============
BEGIN CODE 2
============

Public Sub Send2Contact801()

    DoCmd.SendObject acSendNoObject, , acFormatRTF, _
        ggiGenlInfo.ContactEmail, , , "801 Procurement Card Findings", _
        vbCrLf & ggiGenlInfo.I2CText, False

End Sub

==========
END CODE 2
==========



RE: Error 2766

KerryL,

Does the error exactly contain 'none.'?  If so it may be that it is actually looking for an object titled 'none'.  Do a fing through your code and see if you set anything to 'none'.

regards,

longhair

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close