Hello Erica,

Please read "Bypass security warnings when sending e-mails in MS Access" at
http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/.

Also, you may want to read the following page at Sue's web site:
http://www.outlookcode.com/article.aspx?id=52

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
www.add-in-express.com


"Eka1618" <Eka1618@discussions.microsoft.com> wrote in message
news:F3CC55EF-AF0F-4450-ACD9-958892DAC1BD@microsoft.com...
> Hello,
>
> I am programming a DB in Access and I am getting the Error message "A
> Program is trying to send an e-mail message on your bealf..." This only
> occurs when I send a message without editing it first. I am sending
> messages
> using: DoCmd.sendobject. Many of the resolustion I've seen is for another
> method. Is there anyway I can get rid of this message using the style I
> have
> chosen? Below is a sample of my VB. If anyone know what I can do, please
> let
> me know. Thank you!
>
> ~Erica~
>
> Public Sub SendRequest(frm As Form)
> Dim emName, emName2 As String, varItem As Variant
> Dim emailBody As String
> Dim emailSubject As String
>
> emailSubject = "Product Test Request (Tech. Team Leader next action)"
>
> On Error GoTo btnSend_Click_error
>
> frm.REQUEST_NO.SetFocus
> emailBody = "Hello, " & vbCrLf & vbCrLf & _
> "A product test request has been issued for Request Number: " &
> frm.REQUEST_NO.Text & "." & _
> vbCrLf & vbCrLf & "Please log into the Product Engineering Test
> Database
> to review this request to continue the process, Thank You!"
>
> For Each varItem In frm!lboRequestee.ItemsSelected
> emName = emName & Chr(34) & frm!lboRequestee.Column(2, varItem) &
> Chr(34) & ","
> Next varItem
>
> For Each varItem In frm!lboRequestor.ItemsSelected
> emName2 = emName2 & Chr(34) & frm!lboRequestor.Column(2, varItem) &
> Chr(34) & ","
> Next varItem
>
> 'remove the extra comma at the end
> 'add the requestor to the e-mail list recipients
> emName2 = Left$(emName2, Len(emName2) - 1)
> emName = Left$(emName, Len(emName) - 1)
>
> 'send message
> frm.Visible = False
> DoCmd.SendObject acSendNoObject, , , emName, emName2, , emailSubject,
> emailBody, True, False
>
> btnSend_Click_error:
> If Err.Number = 2501 Then
> MsgBox "You just canceled the e-mail", vbCritical, "Alert"
> End If
> End Sub
30 JunSend Message on Behalf Question.Eka1618
30 Jun\ Re: Send Message on Behalf Question.Andrei Smolin [Add-in...
30 Jun   \ Re: Send Message on Behalf Question.Eka1618
30 Jun      \ Re: Send Message on Behalf Question.Eka1618
All times are in (US) Eastern Daylight Time (GMT -4:00)