A family of Microsoft relational database management systems designed for ease of use.
I gave you 99% of what you needed. Here is the last percent. Your macro should not run the query, but rather run RunCode, with testEmail as the argument. Note that this MUST be a public function in a standard module.
Public Function testEmail()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strTo As String
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("myQuery", dbOpenSnapshot)
If rst.RecordCount > 0 Then
rst.MoveLast
rst.MoveFirst
End If
Debug.Print "testEmail: query returns " & rst.RecordCount & " records."
Do While Not rst.EOF
strTo = strTo & rst.Fields("E-Mail Address") & ";"
rst.MoveNext
Loop
DoCmd.SendObject BCC:=strTo, _
Subject:="my Subject", _
MessageText:="my Message", _
EditMessage:=True ' False to send, True to view/edit
rst.Close
Set rst = Nothing
Set dbs = Nothing
End Function