Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending an e-mail to the results of a query

Status
Not open for further replies.

RCSNC

Technical User
Aug 11, 2003
13
US
I've read through several posts on this topic but none seemed to answer my question exactly. I'm new to Access and need "exact"

I want to (from a command button) start an e-mail to all the e-mail addresses in a query.

For example, I have a query named newStudents which selects all students that will start next term. I want my users to be able to click on a "Send E-mail to New Students" command button and have a message pop up in Outlook with all of the students e-mails in the bcc address list. Other than the addresses correctly populated I just want to specify a subject and then leave the rest (body, whether they actually send it, etc.) up to the user.

Other information you may need:
My email address field is named emailAddress.
I use the newStudents query as a record source for a form named newStudents on which I want to place this button.

I am doing this successfully with one e-mail address, i.e. sending an e-mail from A student's record but no luck so far with sending to a group.

Any help is appreciated, Thanks!
 
Hi

I you are managing to do one EMail address you are there, I cannot really think what it is you do not understand how to do,

the list of Emails to bcc should be seperated with ; so joebloggs@address.com;aanother@soewhere.com

presumably you are using automation code to control an instance of outlook, so you set the bcc property to the list of copy to recipients in a similar way to that which you are using to set teh address of the main recipient

have I missed something?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
When sending the message to one recipient I'm using the code:

Private Sub EnableEmail()
' Update the email button
On Error Resume Next
cmdEmail.HyperlinkAddress = "mailto: " & Me!EmailAddress
End Sub

I think I need to create a string of addresses in something I can call to replace the "EmailAddress" field above. This is where I get lost.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top