Solved

Email in Access

Posted on 2013-01-28
1
254 Views
Last Modified: 2013-01-29
It would be awesome if someone could help me with this. If I need to break it up into more questions, I will.

Ultimately what I am looking for is a button that will send an email through outlook to a client about their children.

Attached I have a Microsoft Access database… when you click the button “OC” in the top right, it will open a form…. Saved “MemoFormOC”

I am looking for a button on this page that will do the following:
1.)      Open another form were we can enter the kids names and ages entering onto the “MemoChildren” table
2.)      Click a button that will send the email that is attached in word.

 Also… there is a field in the email that is “CoachesBioLink”. This is from the table InstructorBio. Depending on who the instructor is on the first form, will determine what link this is too.

One more thing... if possible can the subject of the email say "What <SWIMMER> will learn in swim lessons"?
Practice-for-Email.mdb
Orange-Octopus-Letter.docx
0
Comment
Question by:cansevin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 38829463
This is more like a project request than a request  for help ...

To open a form, use code like this:

Docmd.OpenForm "MemoFormOC"

If you need to pull data for emails, you can do it in several ways. For example, you can open a Recordset to get information:

Dim sEmail As String
Dim rst As DAO.Recordset

Set rst = Currentdb.OpenRecordset("SELECT * FROM SomeTable")

sEmail = rst("SwimmerName") & " - Thanks for contacting us today. We'll send you some information at your address below:" & vbCrLf &  vbCrLf & rst("Street") & vbCrLF & rst("City") & ", " rst("State") & "  " & rst("Zip")

To send an email you can  use SendObject:

DoCmd.SendObject acSendNoObject, , ,  rst("Email"), , , "What " & rst("SwimmerName") & " will learn", sEmail


http://msdn.microsoft.com/en-us/library/office/ff197046.aspx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question