I have a MS Access application that sends email to a list of recipients in a sub-form. This worked without issue in Lotus Notes but following a migration to Outlook I get a ‘Run-time error ‘2295’ (Unknown message recipient), an ideas? Here is the code:
Private Sub cmdEmail_Click()
Dim strBody As String
strBody = “You have just completed a training course and Technical Services would appriciate your participation in our ‘Training Survey'” & vbCrLf & vbCrLf + “Training Course: ” + Me.CourseName & vbCrLf & vbCrLf & “Trainer: ” + Me.Trainer & vbCrLf & vbCrLf & “iCON URL:” & vbCrLf & vbCrLf & Me.IconURL + ” ” & vbCrLf & vbCrLf & vbCrLf & “Thankyou in advance for your participation.” & vbCrLf & “” & vbCrLf & vbCrLf & ” ”
Dim strTitle As String
strTitle = “Training Course Survey”
Dim strAddress As String
Dim strCC As String
Dim rs As DAO.Recordset
Set rs = Me.EmailSurveysSubform.Form.Recordset
rs.MoveFirst
While Not rs.EOF
If Trim(rs.Fields(“Email”)) <> “” Then
strAddress = strAddress & rs.Fields(“email”).Value & “; ”
‘strAddress = rs.Fields(“email”).Value & “; ”
End If
rs.MoveNext
Wend
DoCmd.SendObject , , , strAddress, strCC, , strTitle, strBody
End Sub