G
Guest
I am trying to send out an email to all of the email addresses in a list.
What am I doing wrong? Do I need to activate a reference for the Getrows
function to work, that is the part that I seem to be getting an error on?
Thanks in advance.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sAddress As String
Set db = CurrentDb()
Set rs = CurrentDb.OpenRecordset("Select From [EmailList]")
rs.MoveLast
sAddress = Join(rs.GetRows(rs.RecordCount), ";")
MsgBox sAddress
What am I doing wrong? Do I need to activate a reference for the Getrows
function to work, that is the part that I seem to be getting an error on?
Thanks in advance.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sAddress As String
Set db = CurrentDb()
Set rs = CurrentDb.OpenRecordset("Select From [EmailList]")
rs.MoveLast
sAddress = Join(rs.GetRows(rs.RecordCount), ";")
MsgBox sAddress