G
Guest
I'm using SendObject to create an email concatenating Email addys from a table.
This is my code:
Dim rs1 As DAO.Recordset
Dim sEmail As String
stSQL = "SELECT FROM tblPerson WHERE (((tblPerson.PracticeID) = " & Me.PracticeID & " ))"
Set rs1 = CurrentDb.OpenRecordset(stSQL, dbOpenSnapshot, dbSeeChanges)
sEmail = ""
Do
sEmail = sEmail & rs1!Email & ";"
rs1.MoveNext
Loop Until rs1.EOF
rs1.Close
DoCmd.SendObject , , , sEmail, , , "Ipswich Diabetes Centre Newsletter", "Attached is a copy of the etc ...", -1
I'm getting the error message:
The command or action 'SendObject' isn't available now.
Any ideas?
This is my code:
Dim rs1 As DAO.Recordset
Dim sEmail As String
stSQL = "SELECT FROM tblPerson WHERE (((tblPerson.PracticeID) = " & Me.PracticeID & " ))"
Set rs1 = CurrentDb.OpenRecordset(stSQL, dbOpenSnapshot, dbSeeChanges)
sEmail = ""
Do
sEmail = sEmail & rs1!Email & ";"
rs1.MoveNext
Loop Until rs1.EOF
rs1.Close
DoCmd.SendObject , , , sEmail, , , "Ipswich Diabetes Centre Newsletter", "Attached is a copy of the etc ...", -1
I'm getting the error message:
The command or action 'SendObject' isn't available now.
Any ideas?