Good Afternoon,
I am trying to get the email address (EmailAddy) of all records from a table (tEmail) where the field “SEND” is TRUE and use the returned records as criteria for an Outlook process, w/o using a query. I have the outlook process and all is well there, what I can’t refine is the SQL syntax that returns only the records I’m looking for.
Below is the code I’ve been trying to use and fails:
[indent]
Dim myDb As DAO.Database
Dim myRs As DAO.Recordset
Set myDb = CurrentDb()
mySQL = “SELECT EmailAddy * FROM tEmail WHERE tEmail.Send = -1”
Set myRs = DBEngine(0)(0).OpenRecordset(mySQL, dbOpenDynaset)
[/indent]
Can someone please help me? Thanks.