One alternative is to use the SendObject function. You did not specify
whether you wanted to send an attachment with the email, so I assumed for
the example below that no attachment will be sent, however, you can easily
change this. The example assumes that you have a True/False field
(Checkbox) named SendEmail and an Email field with the user's email address.
Public Function SendEmail()
Dim rs As DAO.Recordset
Dim sEmailTo As String
Set rs = CurrentDb.OpenRecordset("SELECT Email FROM MyTable WHERE
SendEmail=True")
'Create a semicolon separated list of email addresses
Do Until rs.EOF
sEmailTo = sEmailTo & rs("Email") & ";"
rs.MoveNext
Loop
'Strip off the last semicolon
sEmailTo = Left(sEmailTo, Len(sEmailTo) - 1)
DoCmd.SendObject acSendNoObject, "", "", sEmailTo, , , "Declaration of
Independence", "WE hold these Truths to be self-evident...", True
Set rs = Nothing
End Function
Access Help has additional information on the parameters of the SendObject
function.
--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com
This response is supplied "as is" without any representations or warranties.
"acni" <nb***@artscouncil-ni.org> wrote in message
news:d5******************************@localhost.ta lkaboutdatabases.com...
hey
just wondering if anyone could offer a bit of advice to me.i have a
database with a list of contacts on it with a checkbox beside each one.i
was wondering if it was possible to place a command button on the form so
that when you click it it opens an email to send to all those with the
ticked check box?
Thanks in anticipation