joepineapples
Registered User.
- Local time
- Today, 07:14
- Joined
- Apr 28, 2006
- Messages
- 29
Hi All
I've robbed this code form this forum - thanks v much. And I can get it to work if I put "" marks around stSubject on the DoCmd line. But I don't want people to see "stSubject" but rather the content of stSubject.
How can I do this?
I've robbed this code form this forum - thanks v much. And I can get it to work if I put "" marks around stSubject on the DoCmd line. But I don't want people to see "stSubject" but rather the content of stSubject.
How can I do this?
Code:
Sub test()
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Dim stSubject As String
Set rsEmail = CurrentDb.OpenRecordset("EMailTable")
If rsEmail.Fields("Today").Value = Date Then
Do While Not rsEmail.EOF
strEmail = rsEmail.Fields("EMailAddress").Value
stSubject = rsEmail.Fields("Intervention").Value
DoCmd.SendObject , , , strEmail, , , [COLOR="Red"]stSubject[/COLOR], "This is today's message", False
rsEmail.MoveNext
Loop
Set rsEmail = Nothing
End If
End Sub