A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

change e-mail subject



 
 
Thread Tools Display Modes
  #1  
Old May 10th, 2007, 05:04 PM posted to microsoft.public.access.reports
Stacey
external usenet poster
 
Posts: 126
Default change e-mail subject

Does anyone know how to change the subject of an access generated email to
reflect whatever is in a table field? This is what I have. I reports that
are auto-sent and I would like the subject to change to match whatever the
user types in the table. Any suggestions is appreciated. Thanks!

Dim strRecipient As String
Dim strSubject As String
Dim strMessageBody As String
strRecipient = strEmail
strSubject = Reports(strOpenbankacct).Caption
strMessageBody = [Forms]![message].[Body]
DoCmd.SendObject acSendReport, strOpenbankacct, acFormatSNP,
strRecipient, , , strSubject, strMessageBody, False
SendReportByEmail = True
  #2  
Old May 10th, 2007, 11:03 PM posted to microsoft.public.access.reports
Carl Rapson
external usenet poster
 
Posts: 517
Default change e-mail subject

"Stacey" wrote in message
...
Does anyone know how to change the subject of an access generated email to
reflect whatever is in a table field? This is what I have. I reports
that
are auto-sent and I would like the subject to change to match whatever the
user types in the table. Any suggestions is appreciated. Thanks!

Dim strRecipient As String
Dim strSubject As String
Dim strMessageBody As String
strRecipient = strEmail
strSubject = Reports(strOpenbankacct).Caption
strMessageBody = [Forms]![message].[Body]
DoCmd.SendObject acSendReport, strOpenbankacct, acFormatSNP,
strRecipient, , , strSubject, strMessageBody, False
SendReportByEmail = True


You could use DLookUp:

strSubject = DLookUp("field","table","criteria")

Carl Rapson


  #3  
Old May 11th, 2007, 04:36 AM posted to microsoft.public.access.reports
Stacey
external usenet poster
 
Posts: 126
Default change e-mail subject

Carl, I also solved it.....you don't even want to know what I did. I like
your solution a heck of a lot more...so easy! I'm changing what I did to
reflect the DLookup solution. Thanks!! For keeping it simple! =)

"Carl Rapson" wrote:

"Stacey" wrote in message
...
Does anyone know how to change the subject of an access generated email to
reflect whatever is in a table field? This is what I have. I reports
that
are auto-sent and I would like the subject to change to match whatever the
user types in the table. Any suggestions is appreciated. Thanks!

Dim strRecipient As String
Dim strSubject As String
Dim strMessageBody As String
strRecipient = strEmail
strSubject = Reports(strOpenbankacct).Caption
strMessageBody = [Forms]![message].[Body]
DoCmd.SendObject acSendReport, strOpenbankacct, acFormatSNP,
strRecipient, , , strSubject, strMessageBody, False
SendReportByEmail = True


You could use DLookUp:

strSubject = DLookUp("field","table","criteria")

Carl Rapson



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.