Sending an email to multiple users

  • Thread starter Thread starter Guest
  • Start date Start date
DoCmd.SendObject acSendReport, "ReportName", , " 'Chasteen, s'; 'Chasteen,
s'; 'Chasteen, s' "

or
DoCmd.SendObject acSendReport, "ReportName", , "(e-mail address removed);
(e-mail address removed)"
 
Actually I have one more question. Suppose I want to put some text along with
a value from a field on the subject line. How would I write that in the
"SendObject" function?
 
DoCmd.SendObject acSendReport, "ReportName", , "(e-mail address removed);
(e-mail address removed)",,,"What text you want " & Me![Control]
 
Thank you very much!

schasteen said:
DoCmd.SendObject acSendReport, "ReportName", , "(e-mail address removed);
(e-mail address removed)",,,"What text you want " & Me![Control]


Secret Squirrel said:
Actually I have one more question. Suppose I want to put some text along with
a value from a field on the subject line. How would I write that in the
"SendObject" function?
 
No problem. Forgot, if you want text after the control referance:
What text you want " & Me![Control] & " some more text"
Secret Squirrel said:
Thank you very much!

schasteen said:
DoCmd.SendObject acSendReport, "ReportName", , "(e-mail address removed);
(e-mail address removed)",,,"What text you want " & Me![Control]


Secret Squirrel said:
Actually I have one more question. Suppose I want to put some text along with
a value from a field on the subject line. How would I write that in the
"SendObject" function?

:

DoCmd.SendObject acSendReport, "ReportName", , " 'Chasteen, s'; 'Chasteen,
s'; 'Chasteen, s' "

or
DoCmd.SendObject acSendReport, "ReportName", , "(e-mail address removed);
(e-mail address removed)"

:

How do I send an email to multiple users via the "SendObject" function?
 
Ok thanks for that other comment as well. I might need that one too!

I do have one more question though. I have this sendobject command set up to
email out once a form is opened. How come sometimes it works and sometimes it
doesn't? When I exit out of the database and go back in it works fine but
when I close and reopen the form it doesn't always work. Am I missing
something?

schasteen said:
No problem. Forgot, if you want text after the control referance:
What text you want " & Me![Control] & " some more text"
Secret Squirrel said:
Thank you very much!

schasteen said:
DoCmd.SendObject acSendReport, "ReportName", , "(e-mail address removed);
(e-mail address removed)",,,"What text you want " & Me![Control]


:

Actually I have one more question. Suppose I want to put some text along with
a value from a field on the subject line. How would I write that in the
"SendObject" function?

:

DoCmd.SendObject acSendReport, "ReportName", , " 'Chasteen, s'; 'Chasteen,
s'; 'Chasteen, s' "

or
DoCmd.SendObject acSendReport, "ReportName", , "(e-mail address removed);
(e-mail address removed)"

:

How do I send an email to multiple users via the "SendObject" function?
 
How would you send an email to multiple users if you had a list either in a
table or a query. I understand how to hard key a specific address but i need
to email several hundred users and that list can change pending the result of
the query.

Thanks
 
Loop through a recordset that returns all of the users, concatenating their
IDs:

Dim rsUsers As DAO.Recordset
Dim strUsers As String

Set rsUsers = CurrentDb.OpenRecordset("SELECT EMail FROM Users")
Do While rsUsers.EOF = False
strUsers = strUsers & ";"
rsUsers.MoveNext
Loop
rsUsers.Close
strUsers = Left(strUsers, Len(StrUsers) - 1)

Use strUsers in the SendObject command.
 
Back
Top