how do I email from a query

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

Guest

Is there a way to populate the To: field in Outlook from the results of a
query?
 
I don't think you can do it in a query, but you can do it in a form using
code.
 
Create code using the DoCmd.SendObject method

You can tie this to a button if you want and the user can click the button
to create an email.

Assuming you don't want to send any particular object (just open a blank
email) your code would look something like:


Private Sub Command45_Click()
DoCmd.SendObject acSendNoObject, , , [EmailAddressFieldName]
End Sub



Obviously you can make this as comples as you want. You can include some
erro checking, have it attach a report, etc.
 
Thanks Rick, I'll give it a shot.

Rick B said:
Create code using the DoCmd.SendObject method

You can tie this to a button if you want and the user can click the button
to create an email.

Assuming you don't want to send any particular object (just open a blank
email) your code would look something like:


Private Sub Command45_Click()
DoCmd.SendObject acSendNoObject, , , [EmailAddressFieldName]
End Sub



Obviously you can make this as comples as you want. You can include some
erro checking, have it attach a report, etc.

--
Rick B



Mtnman said:
Thanks Rick, how???
 

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

Back
Top