Sending e-mail from a form based on query results

pabloUSA

Registered User.
Local time
Today, 07:49
Joined
Mar 24, 2014
Messages
12
Hi,

I really need an urgent help.

I have got a form (name: SearchForm) that displays results of a query (name: AircraftSearch). It is a continuous form displaying multiple results of a search done by the query. I need to be able to send an e-mail to multiple recipients chosen from results displayed on the form.

One of the form's field (a text box called: EmailToOperator) is containing e-mail address to an aircraft operator selected by the underlying query. I need to be able to place a check box button (or something similar) that is going to select the e-mail address. The tricky part is to have multiple check boxes allocated for each record displayed on the form and have them working independently.

The second task is sending a one message (via Microsoft Outlook 2010) to chosen multiple recipients (with no attachments) having the recipients' addresses not visible to each other.

I really need to get through it and I've been stuck on it for almost two day.
Please help.
:banghead::banghead::banghead::banghead::banghead::banghead::banghead::banghead:

pabloUSA
 
I need to be able to place a check box button (or something similar) that is going to select the e-mail address. The tricky part is to have multiple check boxes allocated for each record displayed on the form and have them working independently.
You might not be able to achieve this using a Continuous Form. They cannot have unbound checkboxes. They have to be bound. Or you can use a Listbox and have Multiselct to True. That way multiple records can be selected.
The second task is sending a one message (via Microsoft Outlook 2010) to chosen multiple recipients (with no attachments) having the recipients' addresses not visible to each other.
Add the emails to the BCC (Blind Carbon Copy) instead of the To part; this will not reveal the email addresses.
 
Hi Paul,

Thanks for a quick answer. I'm really new to Access and I do not have a clue how to tackle this. Would you be so kind an guide me through the steps needed to resolve the issue?
Thanks

pabloUSA
 
Paul,
Do you think is possible to place a check box that is bound to the source of e-mail address info (in my case, table: AircraftOperators, field: EmailToOperator) and use to find a match in the undying table. Then have those matches embedded into Outlook BBC field?

thanks
 
Is any of this code would be helpful to solve it:
Dim strSql
Dim db As Database
Set db = CurrentDb()
Dim rs As Recordset
Dim Lrs As DAO.Recordset
Dim Outlook

strSql = "SELECT primaryemail FROM tblGoldMine WHERE pipeline=-1;"
Set Lrs = db.OpenRecordset(strSql)

Do While Not Lrs.EOF
Outlook = Outlook + Lrs("primaryemail") + ";"
Lrs.MoveNext
Loop


Dim rng
Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
.To = Outlook
.CC = ""
.BCC = ""
.Display
End With
On Error GoTo 0


Set OutMail = Nothing
Set OutApp = Nothing

Thanks
 
I could not exactly give you directions, because I am lost in your request. Just take one step back, and explain how are you filtering, how is your form designed.
 
Hi Paul,

Thank for you time.

The form is designed to display results from my search query (name: AircraftSearch). It has 8 text boxes one combo box used only to display info from the query. It is a continuous form and it display multiple search results. One of the text boxes contains a e-mail address to an aircraft operator that was filtered by the query. As the form displays multiple records, I need to allow the user to pick the e-mail addresses (from those multiple records) and send one e-mail to chosen aircraft operators hawing their e-mail addresses not visible to each other.

I was thinking about placing a unbound check box on my form that would allow used to chose an option (or more likely several options) to send e-mail messages to. The e-mail addresses are stored in tblAircrafOperators in a field: EmailToAircrafOperator).

Please let me know if you have any questions.

I really need to tackle this thing and I'm very flexible on the design of this particular function.

Thanks again,

pabloUSA
 
Anyone has got any ideas how to tackle this??????????

Thanks
 

Users who are viewing this thread

Back
Top Bottom