Solved

Email Current Record Access 2007 VB Issue

Posted on 2013-01-11
3
430 Views
Last Modified: 2013-01-11
Hi,

I would like to know if it is possible to e-mail fields from the current record only.

I'm writing a holiday calendar.  Once the user enters the start and end date, I want to e-mail this to their manager to authorise.  I don't want to attach a report, just use the dates the user has just entered.

The below is garbage I've written...sorry I know I'm bad...

Dim strMsgBody As String

strMsgBody = " Please Authorise the holiday dates," & [Table].[StartDate] & "to " & [Table].[EndDate]

DoCmd.SendObject acSendNoObject, , , , , , , strMsgBody


Thanks,

Rich
0
Comment
Question by:squidlings
[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
  • 2
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 38766777
<< I would like to know if it is possible to e-mail fields from the current record only. >>

Do you mean start and end dates as displayed in the record the user is currently seeing on a form?


strMsgBody = " Please Authorise the holiday date: " & Me.[StartDate] & " to " & Me.[EndDate]

' Youll have to fill in more of this line... email addresses, etc
DoCmd.SendObject acSendNoObject, , , , , , , strMsgBody

Open in new window

0
 

Author Comment

by:squidlings
ID: 38766823
Perfecto!!!  Easy as that... Massive thanks.

Rich
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38766827
You're welcome :)
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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 …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

724 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