Email to Query Results

webgirly

New member
Local time
Today, 14:52
Joined
Dec 6, 2005
Messages
8
I hope I can explain this clearly. I'd be really grateful if anyone could help.

I need to set up some sort of contacts database at work.

I need (I think, after having a little think about it) one table, filled with people, (their names, contact details ect) and basically various queries to pull up people in certain groups. Say for instance, people who attend meeting a, b, c, (in a simplised, condensed version of the truth)

I did think about doing this with various tables actually. A contacts table, a meetings table, blah blah, but anyway. (Any advice on this incidentally would be great).

My main problem though. We often have to email all the people who attend say meeting a. We have contacts on our email systems, but they're different from person to person, and as the company is updating email systems, we can't even send contacts lists to everyone, as they're not compatible.

What I'd love is to be able to call up a list of people attending meeting a from my database and email each of those people (their contact details would include email address of course)

Does that make sense?

Is there any way of doing this?

I'd be really happy if anyone knew...
 
I have everything set up now as far as emailing is concerned, I have a table for contacts, and table for groups and a junction table to resolve the many to many relationship.

I've created a form that will call up a list of contacts that belong to each group, the list is based on a query which is filtered according to which group is being viewed, and includes their email addresses.

What I need now is a button that on clicking, will open an email with all the email addresses for the contacts in the 'to' field.

So, basically, I go to the newsletter group, all the contacts in that group are shown in the listbox, I click a button and an email is generated to all those people.

Is this at all possible?
 
I have everything set up now as far as emailing is concerned, I have a table for contacts, and table for groups and a junction table to resolve the many to many relationship.

I've created a form that will call up a list of contacts that belong to each group, the list is based on a query which is filtered according to which group is being viewed, and includes their email addresses.

What I need now is a button that on clicking, will open an email with all the email addresses for the contacts in the 'to' field.

So, basically, I go to the newsletter group, all the contacts in that group are shown in the listbox, I click a button and an email is generated to all those people.

Is this at all possible?
 
Not sure if you resolved this problem or not.

Below is an example database containing a list box where you select the people you wish to email - I realise your situation is a little bit different here - the listbox was originally created by Mile ie SJ McAbney - I'm not stealing any credit here!

I have added a cmd button to SJ's example db where it will take the chosen recipients over to outlook, this seems to be the part you still have a problem with so hopefully this will help.

Hay
 

Attachments

WebGirly,

Did you find a way to email directly from the query results? I am trying to do the same thing.

Thanks
 
Here is my current Code. Is there no way to attach the query results to 'strtofield'


Private Sub bemail_Click()
On Error GoTo Err_bemail_click

'DoCmd.SendObject acSendNoObject, , , Me!txtemailaddress, , , , , True
Dim strToField As String
Dim strccField As String
Dim strSubject As String
Dim strMessage As String

' use the Me.[FieldName] to get the value from any field.
strToField = "npayne@wherever.com"
strSubject = "CT#" & Me.CTName & " VOC Leak"
strMessage = "An El Paso Stripper Test on CT#" & Me.CTName & " indicated potential leakage of VOC into the, etc, etc"


DoCmd.SendObject , , , strToField, , , strSubject, _
strMessage, True

Exit_bemail_click:
Exit Sub

Err_bemail_click:
MsgBox Err.Description
Resume Exit_bemail_click

End Sub
 
Sure; following the process in the link would be a good start.
 
I get the error message "Too few parameters. Expected 1"
 

Users who are viewing this thread

Back
Top Bottom