Solved

Email in Access

Posted on 2013-01-28
1
251 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now