Sending Emails

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
 
J

Jim/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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top