Solved

Email in Access

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

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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 Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

707 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