Solved

Email in Access

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

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…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

777 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