Sending Emails

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to send an email but need the result of the query/table to be
contained in the message body of the email.

For example, the table is called 'Request' and the field I'd want sent is
'Data'....is there a way to do this ?

Thank you for reading !

Chris
 
You could try using code instead of a macro. Set up a form
that will contain the subject and text. then add a button
with the following code behind it.

Private Sub Command32_Click()
On Error GoTo Email_Initial_Request_Err
Dim mvar, Submitted, strproblem, strsubject
Dim Mydate

strsubject = Me![subject]
strtext = Me![Text]

'
On Error GoTo Email_Initial_Request_Err

DoCmd.SendObject , "Email Initial Request",
"MicrosoftExcel(*.xls)", "Email address1, "Email address2",
strsubject, strtext, False, ""
' If you want to view the email before sending change False
' To True
Beep
MsgBox "Email has been sent.", vbOKOnly, ""

Email_Initial_Request_Exit:
Exit Sub

Jim
 
Back
Top