Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Sending Email to multiple directions in one table.


(!)

emartz's Avatar
emartz emartz is offline
Member with 7 posts.
THREAD STARTER
 
Join Date: Aug 2012
Experience: Beginner
09-Aug-2012, 05:15 AM #1
Sending Email to multiple directions in one table.
Hello guys,

I've found several tutorials explaining how to send emails taking access' contact-forms to outlook, but I'm so noobish in this field and find myself unable to follow them.

So, I've came here asking you as my last try to do this access thingy

Here's the problem: I've got a form where you can chose from a list-box several student-grants for viewing its info on the text-boxes placed bellow. And just on the bottom of this form, there's a subform with a table which shows the students' info who have signed up for it. (Anyway, I've attached a screen for explaining it better)

In this table, there's a record for their emails, and what I'm trying to place is a button which automaticaly opens Outlook and has all those emails shown as recipients... but I really have no idea on how to do this.

Thank you very much

ps: Sorry if I haven't explained myself very well.
Attached Thumbnails
Sending Email to multiple directions in one table.-screen.jpg  
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
09-Aug-2012, 06:19 AM #2
emartz, welcome to the Forum.
Do you want all the email addresses on the "To" recipient line?
Do you want to compose the email message in Access or Outlook?
emartz's Avatar
emartz emartz is offline
Member with 7 posts.
THREAD STARTER
 
Join Date: Aug 2012
Experience: Beginner
09-Aug-2012, 06:35 AM #3
Thank you for your fast reply

Yup, I'd like all the email addresses on the To recipient line and compose the email in Outlook

Again, thanks
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
09-Aug-2012, 06:47 AM #4
Do you get the data for the subform in a query or directly from the table?
What is the Master/Child Link between the Main and Sub forms?
emartz's Avatar
emartz emartz is offline
Member with 7 posts.
THREAD STARTER
 
Join Date: Aug 2012
Experience: Beginner
09-Aug-2012, 06:53 AM #5
I get the data directly from the table. The master link goes from "CODIGO SUBVENCION" and "CODIGO".

Is that the info you need?

Thanks
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
09-Aug-2012, 07:07 AM #6
Yes, what is the name of the Table that supplies the email addresses?
How good are you at creating Queries?
It would be easier if you created a query based on the student email table with a "Criteria" set to the record on the mainform.

What version of Access are you using?
__________________
OBP
I do not give up easily
emartz's Avatar
emartz emartz is offline
Member with 7 posts.
THREAD STARTER
 
Join Date: Aug 2012
Experience: Beginner
10-Aug-2012, 03:51 AM #7
Being honest, I'm really bad creating queries :3 It took me so long to create that link between the form and the table, so you can imagine...

I'm using 2010's version
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
10-Aug-2012, 05:22 AM #8
What is the name of the Table that supplies the email addresses for the subform?
emartz's Avatar
emartz emartz is offline
Member with 7 posts.
THREAD STARTER
 
Join Date: Aug 2012
Experience: Beginner
10-Aug-2012, 05:45 AM #9
That table is called SOLICITANTES
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
10-Aug-2012, 06:52 AM #10
OK, I think I have found an easier way to this.
Can you place a Command Button on the Header or Footer of the Subform using the Command button Wizard on the Design View menu?
The button can be for anything you like, going to the next record would be fine.
emartz's Avatar
emartz emartz is offline
Member with 7 posts.
THREAD STARTER
 
Join Date: Aug 2012
Experience: Beginner
13-Aug-2012, 04:01 AM #11
Sorry for being so late replying

Yep, I've got the button placed
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
13-Aug-2012, 09:26 AM #12
OK, replace all of the VBA code between the opening line and the End Sub with the following.

Dim rs As Object, count as integer, EmailAddress as string, reccount As Integer, stFileName As String
On Error GoTo errorcatch
EmailAddress = ""

Set rs = Me.Recordset.Clone
rs.MoveLast
rs.MoveFirst
recount = rs.RecordCount
For count = 1 To recount
If Not IsNull(rs![CORREO ELECTRONICO]) Then
EmailAddress = EmailAddress & rs![CORREO ELECTRONICO] & "; "
End If
rs.MoveNext
Next count
rs.Close
Set rs = Nothing
EmailAddress = left(EmailAddress, len(EmailAddress) - 2)
msgbox EmailAddress

'MsgBox "emails have been sent."
Exit Sub
errorcatch:
MsgBox Err.Description

this will go through each of the records in the subform and add the email address to a text string, when it has finished it will give you a message box showing the email addresses that will go in tot the "To" of the outlook message.
It does not yet open outlook and put it in, to do this you will have to open the VBA Editor's "Library References" using the VBA Editor's Main Menu>Tools>References, click on the side bar of the list and find Microsoft Outlook and tick it.
emartz's Avatar
emartz emartz is offline
Member with 7 posts.
THREAD STARTER
 
Join Date: Aug 2012
Experience: Beginner
24-Aug-2012, 03:44 AM #13
Sorry for my late reply, I had to be off internet during this time

I've pasted it, but it shows a message box saying Item not found in this collection..
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,517 posts.
 
Join Date: Mar 2005
Location: UK
24-Aug-2012, 10:05 AM #14
Is the field CORREO ELECTRONICO on your form?
And is that it's Name?
The Control source and the name of a field can be different.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
acces, email, record, tab

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑