I get an error when I run the following code. The error is "Microsoft Access can't open the mail session. Check your mail application to make sure it's working properly"
This is the code:
Private Sub Command112_Click()
Dim db As database
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT * " & _
"FROM TblContactsTEMP " & _
"WHERE (((TblContactsTEMP.[Select])=True)) "
Set rsEmail = db.OpenRecordset(strSQL)
Do While Not rsEmail.EOF
strEmail = rsEmail.Fields("email").Value
DoCmd.SendObject , , , strEmail, , , "TEST", "http:/www.TEST.com"
rsEmail.MoveNext
Loop
Set rsEmail = Nothing
End Sub
Has anyone come across this problem before?
If so how can it be remedied?
Any help would be much appreciated
This is the code:
Private Sub Command112_Click()
Dim db As database
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT * " & _
"FROM TblContactsTEMP " & _
"WHERE (((TblContactsTEMP.[Select])=True)) "
Set rsEmail = db.OpenRecordset(strSQL)
Do While Not rsEmail.EOF
strEmail = rsEmail.Fields("email").Value
DoCmd.SendObject , , , strEmail, , , "TEST", "http:/www.TEST.com"
rsEmail.MoveNext
Loop
Set rsEmail = Nothing
End Sub
Has anyone come across this problem before?
If so how can it be remedied?
Any help would be much appreciated