Hey guys,
I have a code wich i know has the records in my filter :
Code:
Dim rst As Object
Set rst = Me.RecordsetClone
On Error Resume Next
rst.MoveLast
On Error GoTo 0
Now i found a piece of code that selects emailadressen from my table.
Code:
Dim rst As DAO.Recordset
Dim strTo As String
Set rst = CurrentDb.OpenRecordset("SELECT [EmailAddress] FROM Members
WHERE [EmailAddress] Is Not Null")
With rst
Do Until .EOF
strTo = strTo & ![EmailAddress] & ";"
.MoveNext
Loop
.Close
End With
strTo = Left(strTo, Len(strTo)-1)
Set rst = Nothing
My question is how to combine the two codes, or is there a better way to pull emailadresses from my table that are IN my recordset ?
So i have a form and im filtering records. I want to email the people in my recordset.
Im using this to email :
Code:
DoCmd.SendObject , , , strTo, , , , , True
Any help would be appreciated !
Greetings, Jeroen