I have the following code which is opening a recordset of the field <i>email<i/>. I know there are at least 2 different email addresses in there, but it only ever sends to the first one. I presume I need to loop through the recordset somehow?
Dim db As Database
Dim rs As Recordset
Dim strsql As String
Set db = CurrentDb
strsql = "SELECT DiSTINCT email from test_email"
Set rs = db.OpenRecordset(strsql)
DoCmd.SendObject acSendForm, "testemail", acFormatXLS, rs("email", , , , , True
regards
Tony
Dim db As Database
Dim rs As Recordset
Dim strsql As String
Set db = CurrentDb
strsql = "SELECT DiSTINCT email from test_email"
Set rs = db.OpenRecordset(strsql)
DoCmd.SendObject acSendForm, "testemail", acFormatXLS, rs("email", , , , , True
regards
Tony