Dougalsworld
Paul
- Local time
- Today, 11:28
- Joined
- Jul 29, 2005
- Messages
- 62
hi folks
I've had a search on the forum to no avail...
I have the following code that sends an email...
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim sToName As String
Dim sccname As String
Dim sSubject As String
Dim sMessageBody As String
Set MyDb = CurrentDb()
Me.Refresh
Set rsEmail = MyDb.OpenRecordset("qry_Mail_Booking", dbOpenSnapshot)
'loop to retrieve multiple email addresses from management
'cc in local HR
With rsEmail
.MoveFirst
Do Until rsEmail.EOF
If IsNull(.Fields(0)) = False Then
sToName = .Fields(0)
sccname = .Fields(1)
sSubject = .Fields(5) & " On " & [txtCourseDate]
sMessageBody = [txtCourseDate]
DoCmd.SendObject acSendNoObject, , , _
sToName, sccname, , sSubject, sMessageBody, False, False
End If
.MoveNext
Loop
End With
What I want to do is add a couple of voting buttons to this, but I have no idea how to do this, does anyone have any ideas?
Many Thanks
I've had a search on the forum to no avail...
I have the following code that sends an email...
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim sToName As String
Dim sccname As String
Dim sSubject As String
Dim sMessageBody As String
Set MyDb = CurrentDb()
Me.Refresh
Set rsEmail = MyDb.OpenRecordset("qry_Mail_Booking", dbOpenSnapshot)
'loop to retrieve multiple email addresses from management
'cc in local HR
With rsEmail
.MoveFirst
Do Until rsEmail.EOF
If IsNull(.Fields(0)) = False Then
sToName = .Fields(0)
sccname = .Fields(1)
sSubject = .Fields(5) & " On " & [txtCourseDate]
sMessageBody = [txtCourseDate]
DoCmd.SendObject acSendNoObject, , , _
sToName, sccname, , sSubject, sMessageBody, False, False
End If
.MoveNext
Loop
End With
What I want to do is add a couple of voting buttons to this, but I have no idea how to do this, does anyone have any ideas?
Many Thanks
Last edited: