Solved

Email Current Record Access 2007 VB Issue

Posted on 2013-01-11
3
428 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
  • 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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 …
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 …

749 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