I just created the following working example in MS Access 97.
Example table (I checked the code with valid email addresses):
Identifier Name Email
1 Rics rics@stack.com
2 Kate kate@stack.com
3 X x@stack.com
One-button form. When the button is pressed, the following code is executed:
Private Sub Mail_Click() Dim r As Recordset Dim email As String Set r = CurrentDb.OpenRecordset("select * from Addresses") Do While Not r.EOF email = r(2) DoCmd.SendObject acSendNoObject, Null, Null, email, Null, Null, "Test subject", "Message body of the test letter", False, Null r.MoveNext Loop r.Close End Sub
Hope you can paste it into your application.
source share