I want to send mail from Access to multiple recipients. The recipients are in a table. The code gives me errorcode 3061. What am I doing wrong?
Code:
Dim oApp As Object
Dim oMail As Object
Dim oByValue
Dim Ldatum As String
Dim AfzenderVN As String 'voornaam
Dim AfzenderAN As String 'achternaam
Dim strEMail As String
Dim MyDB As DAO.Database
Dim rstEMail As DAO.Recordset
Dim strBuild As String
Dim strSQL As String
strSQL = "SELECT * FROM qryKwaliteitsbeheerMail "
Set MyDB = CurrentDb
Set rstEMail = MyDB.OpenRecordset(strSQL, dbOpenForwardOnly)
With rstEMail
Do While Not .EOF
strBuild = strBuild & ![MailAdres] & ";" 'Build the 'TO'String
.MoveNext
Loop
End With