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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|