Please see below. How do augment the code? I need to send emails without reports. Thank you.
Private Sub cmdSend_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim txtTO, txtCC, txtBCC, txtSubject, txtMessage As String
txtTO = ""
txtCC = ""
txtBCC = ""
txtSubject = ""
txtMessage = "" _
& vbCrLf & vbCrLf & "" _
& vbCrLf & vbCrLf & "" _
& vbCrLf & vbCrLf & ""
Set db = CurrentDb
Set rs = db.OpenRecordset("Test", dbOpenDynaset)
rs.MoveFirst
Do
gblvID = rs("ID"
txtTO = rs("EmailAddress"
DoCmd.SendObject acSendReport, "", acFormatRTF, txtTO, txtCC, txtBCC, txtSubject, txtMessage, False
rs.MoveNext
Loop Until rs.EOF
rs.Close
db.Close
End Sub
Private Sub cmdSend_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim txtTO, txtCC, txtBCC, txtSubject, txtMessage As String
txtTO = ""
txtCC = ""
txtBCC = ""
txtSubject = ""
txtMessage = "" _
& vbCrLf & vbCrLf & "" _
& vbCrLf & vbCrLf & "" _
& vbCrLf & vbCrLf & ""
Set db = CurrentDb
Set rs = db.OpenRecordset("Test", dbOpenDynaset)
rs.MoveFirst
Do
gblvID = rs("ID"
txtTO = rs("EmailAddress"
DoCmd.SendObject acSendReport, "", acFormatRTF, txtTO, txtCC, txtBCC, txtSubject, txtMessage, False
rs.MoveNext
Loop Until rs.EOF
rs.Close
db.Close
End Sub