C
CJ
Hi Groupies
I have a form that lists all of my potential email recipients, allows me to
enter a subject and text message. Unfortunately, I get an "Outlook cannot
send this email" error message when I push the command button to make it
run.
Can somebody please take a look and help me out. Code is not my strength....
Private Sub cmdSendEmail_Click()
On Error GoTo Err_cmdSendEmail_Click
Dim strContacts As String
Dim strSubject As String
Dim strMessage As String
strContacts = Me.lstContacts & vbNullString
strSubject = Me.txtSubject & vbNullString
strMessage = Me.txtMessage & vbNullString
DoCmd.SendObject acSendNoObject, , , strContacts, , , strSubject,
strMessage
Exit_cmdSendEmail_Click:
Exit Sub
Err_cmdSendEmail_Click:
MsgBox Err.Description
Resume Exit_cmdSendEmail_Click
End Sub
I have a form that lists all of my potential email recipients, allows me to
enter a subject and text message. Unfortunately, I get an "Outlook cannot
send this email" error message when I push the command button to make it
run.
Can somebody please take a look and help me out. Code is not my strength....
Private Sub cmdSendEmail_Click()
On Error GoTo Err_cmdSendEmail_Click
Dim strContacts As String
Dim strSubject As String
Dim strMessage As String
strContacts = Me.lstContacts & vbNullString
strSubject = Me.txtSubject & vbNullString
strMessage = Me.txtMessage & vbNullString
DoCmd.SendObject acSendNoObject, , , strContacts, , , strSubject,
strMessage
Exit_cmdSendEmail_Click:
Exit Sub
Err_cmdSendEmail_Click:
MsgBox Err.Description
Resume Exit_cmdSendEmail_Click
End Sub